From jnelson at burntmail.com Thu Jul 1 22:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu Jul 1 22:07:30 2004 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 13:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 2 13:31:09 2004 Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 18:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jul 2 17:58:41 2004 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 18:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jul 2 18:32:19 2004 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 18:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 2 18:44:00 2004 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 19:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jul 2 19:02:13 2004 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 19:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jul 2 19:37:04 2004 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # Internal Error (53414645504F494E540E43505001C0), pid=13375, tid=1308625840 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta2-b51 mixed mode) --------------- T H R E A D --------------- Current thread (0x083c6460): JavaThread "Thread-0" [_thread_in_native_trans, id=13392] Stack: [0x4df80000,0x4e001000), sp=0x4dffff18, free space=511k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x2db403] V [libjvm.so+0x119c59] V [libjvm.so+0x27fee4] V [libjvm.so+0x2affc9] V [libjvm.so+0x1710dd] C [librxtxSerial.so+0x69bb] send_event+0x7f C [librxtxSerial.so+0x5a73] check_line_status_register+0x9f C [librxtxSerial.so+0x5e65] report_serial_events+0x1d C [librxtxSerial.so+0x6237] Java_gnu_io_RXTXPort_eventLoop+0xb7 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x16827c] V [libjvm.so+0x256038] V [libjvm.so+0x167ad5] V [libjvm.so+0x167b6e] V [libjvm.so+0x1d44f5] V [libjvm.so+0x2ae8ed] V [libjvm.so+0x256b48] C [libpthread.so.0+0x47fc] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) =>0x083c6460 JavaThread "Thread-0" [_thread_in_native_trans, id=13392] 0x081aa470 JavaThread "reader" [_thread_blocked, id=13384] 0x081abf48 JavaThread "SNMPClient" [_thread_blocked, id=13383] 0x080c4ba8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=13381] 0x080c3658 JavaThread "CompilerThread0" daemon [_thread_blocked, id=13380] 0x080c27b8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=13379] 0x080b78f8 JavaThread "Finalizer" daemon [_thread_blocked, id=13378] 0x080b6c58 JavaThread "Reference Handler" daemon [_thread_blocked, id=13377] 0x0805aba0 JavaThread "main" [_thread_blocked, id=13375] Other Threads: 0x080b2930 VMThread [id=13376] 0x080df840 WatcherThread [id=13382] VM state:synchronizing (normal execution) VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) [0x0805a038/0x0805a060] Threads_lock - owner thread: 0x080b2930 [0x0805a488/0x0805a4a0] Heap_lock - owner thread: 0x081aa470 Heap def new generation total 576K, used 514K [0x456e0000, 0x45780000, 0x45bc0000) eden space 512K, 100% used [0x456e0000, 0x45760000, 0x45760000) from space 64K, 4% used [0x45760000, 0x45760a58, 0x45770000) to space 64K, 0% used [0x45770000, 0x45770000, 0x45780000) tenured generation total 1408K, used 469K [0x45bc0000, 0x45d20000, 0x496e0000) the space 1408K, 33% used [0x45bc0000, 0x45c354c0, 0x45c35600, 0x45d20000) compacting perm gen total 8192K, used 3168K [0x496e0000, 0x49ee0000, 0x4d6e0000) the space 8192K, 38% used [0x496e0000, 0x499f82e0, 0x499f8400, 0x49ee0000) No shared spaces configured. Dynamic libraries: 00632000-00647000 r-xp 00000000 03:01 42854 /lib/ld-2.3.2.so 00647000-00648000 rw-p 00015000 03:01 42854 /lib/ld-2.3.2.so 0064a000-0077d000 r-xp 00000000 03:01 81603 /lib/tls/libc-2.3.2.so 0077d000-00781000 rw-p 00132000 03:01 81603 /lib/tls/libc-2.3.2.so 00781000-00783000 rw-p 00000000 00:00 0 00785000-007a6000 r-xp 00000000 03:01 81605 /lib/tls/libm-2.3.2.so 007a6000-007a7000 rw-p 00020000 03:01 81605 /lib/tls/libm-2.3.2.so 007a9000-007ab000 r-xp 00000000 03:01 42856 /lib/libdl-2.3.2.so 007ab000-007ac000 rw-p 00001000 03:01 42856 /lib/libdl-2.3.2.so 008b1000-008be000 r-xp 00000000 03:01 81612 /lib/tls/libpthread-0.60.so 008be000-008bf000 rw-p 0000d000 03:01 81612 /lib/tls/libpthread-0.60.so 008bf000-008c1000 rw-p 00000000 00:00 0 00cca000-00cdc000 r-xp 00000000 03:01 42915 /lib/libnsl-2.3.2.so 00cdc000-00cdd000 rw-p 00011000 03:01 42915 /lib/libnsl-2.3.2.so 00cdd000-00cdf000 rw-p 00000000 00:00 0 08048000-08056000 r-xp 00000000 03:05 246028 /usr/local/java/bin/java 08056000-08058000 rw-p 0000e000 03:05 246028 /usr/local/java/bin/java 08058000-083ed000 rwxp 00000000 00:00 0 40000000-40001000 ---p 00000000 00:00 0 40001000-40007000 r-xp 00000000 03:05 573957 /usr/local/java/jre/lib/i386/native_threads/libhpi.so 40007000-40008000 rw-p 00006000 03:05 573957 /usr/local/java/jre/lib/i386/native_threads/libhpi.so 40008000-40012000 r-xp 00000000 03:01 42876 /lib/libnss_files-2.3.2.so 40012000-40013000 rw-p 0000a000 03:01 42876 /lib/libnss_files-2.3.2.so 40013000-4001b000 rw-s 00000000 03:01 38922 /tmp/hsperfdata_root/13375 4001c000-4001e000 rw-p 00004000 00:00 0 4001e000-4033b000 r-xp 00000000 03:05 573966 /usr/local/java/jre/lib/i386/client/libjvm.so 4033b000-40359000 rw-p 0031c000 03:05 573966 /usr/local/java/jre/lib/i386/client/libjvm.so 40359000-4076e000 rw-p 00000000 00:00 0 4076e000-40779000 r-xp 00000000 03:05 573973 /usr/local/java/jre/lib/i386/libverify.so 40779000-4077a000 rw-p 0000b000 03:05 573973 /usr/local/java/jre/lib/i386/libverify.so 4077a000-4079a000 r-xp 00000000 03:05 573974 /usr/local/java/jre/lib/i386/libjava.so 4079a000-4079c000 rw-p 0001f000 03:05 573974 /usr/local/java/jre/lib/i386/libjava.so 4079c000-407af000 r-xp 00000000 03:05 573976 /usr/local/java/jre/lib/i386/libzip.so 407af000-407b1000 rw-p 00012000 03:05 573976 /usr/local/java/jre/lib/i386/libzip.so 407b1000-42d2a000 r--s 00000000 03:05 180729 /usr/local/java/jre/lib/rt.jar 42d2a000-42d92000 rw-p 00000000 00:00 0 42d92000-42e12000 r--s 00000000 03:05 180725 /usr/local/java/jre/lib/jsse.jar 42e12000-42e26000 r--s 00000000 03:05 180510 /usr/local/java/jre/lib/jce.jar 42e26000-43660000 r--s 00000000 03:05 180727 /usr/local/java/jre/lib/charsets.jar 43660000-43768000 rwxp 00000000 00:00 0 43768000-45660000 rwxp 00108000 00:00 0 45660000-45665000 rwxp 00000000 00:00 0 45665000-456e0000 rwxp 02005000 00:00 0 456e0000-45780000 rwxp 00000000 00:00 0 45780000-45bc0000 rwxp 02120000 00:00 0 45bc0000-45d20000 rwxp 00000000 00:00 0 45d20000-496e0000 rwxp 026e0000 00:00 0 496e0000-49ee0000 rwxp 00000000 00:00 0 49ee0000-4d6e0000 rwxp 06880000 00:00 0 4d6e0000-4d6e1000 rwxp 00000000 00:00 0 4d6e1000-4d6e2000 rwxp 0a081000 00:00 0 4d6e2000-4d6e4000 rwxp 00000000 00:00 0 4d6e4000-4d700000 rwxp 0a084000 00:00 0 4d700000-4d704000 rwxp 00000000 00:00 0 4d704000-4d720000 rwxp 0a0a4000 00:00 0 4d720000-4d722000 rwxp 00000000 00:00 0 4d722000-4d73f000 rwxp 00001000 00:00 0 4d73f000-4d744000 rwxp 00000000 00:00 0 4d744000-4d760000 rwxp 00023000 00:00 0 4d760000-4d761000 ---p 00000000 00:00 0 4d761000-4d7e1000 rwxp 00001000 00:00 0 4d7e1000-4d7e4000 ---p 00081000 00:00 0 4d7e4000-4d862000 rwxp 00084000 00:00 0 4d862000-4d865000 ---p 00102000 00:00 0 4d865000-4d8e3000 rwxp 00105000 00:00 0 4d8e3000-4dae3000 r--p 00000000 03:05 301033 /usr/lib/locale/locale-archive 4dae3000-4dae6000 ---p 00003000 00:00 0 4dae6000-4db64000 rwxp 00006000 00:00 0 4db64000-4db67000 ---p 00084000 00:00 0 4db67000-4dbe5000 rwxp 00087000 00:00 0 4dbe5000-4dbe8000 ---p 00105000 00:00 0 4dbe8000-4dc66000 rwxp 00108000 00:00 0 4dc66000-4dc67000 ---p 00186000 00:00 0 4dc67000-4dce7000 rwxp 00187000 00:00 0 4dce7000-4dd0d000 r--s 00000000 03:05 574014 /usr/local/java/jre/lib/ext/sunjce_provider.jar 4dd0d000-4dd38000 r--s 00000000 03:05 574015 /usr/local/java/jre/lib/ext/sunpkcs11.jar 4dd38000-4dd3a000 r--s 00000000 03:05 574016 /usr/local/java/jre/lib/ext/dnsns.jar 4dd3a000-4ddfe000 r--s 00000000 03:05 574017 /usr/local/java/jre/lib/ext/localedata.jar 4ddfe000-4de64000 r--s 00000000 03:05 573924 /usr/local/java/jre/lib/ext/OneWireAPI.jar 4de64000-4de73000 r--s 00000000 03:05 573944 /usr/local/java/jre/lib/ext/RXTXcomm.jar 4de73000-4de76000 ---p 00003000 00:00 0 4de76000-4def4000 rwxp 00006000 00:00 0 4def4000-4def7000 ---p 00084000 00:00 0 4def7000-4df75000 rwxp 00087000 00:00 0 4df75000-4df7f000 r-xp 00000000 03:05 579296 /usr/local/java/jre/lib/i386/librxtxSerial-2.1-7pre17.so 4df7f000-4df80000 rw-p 00009000 03:05 579296 /usr/local/java/jre/lib/i386/librxtxSerial-2.1-7pre17.so 4df80000-4df83000 ---p 00003000 00:00 0 4df83000-4e001000 rwxp 00006000 00:00 0 bfe00000-bfe03000 ---p 00000000 00:00 0 bfe03000-c0000000 rwxp ffe04000 00:00 0 VM Arguments: java_command: Tempd Environment Variables: PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin LD_LIBRARY_PATH=/usr/local/java/jre/lib/i386/client:/usr/local/java/jre/lib/i386:/usr/local/java/jre/../lib/i386 SHELL=/bin/bash --------------- S Y S T E M --------------- OS:Fedora Core release 1 (Yarrow) uname:Linux 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 libc:glibc 2.3.2 NPTL 0.60 rlimit: STACK 10240k, CORE 0k, NPROC 2037, NOFILE 1024, AS infinity load average:2.14 2.12 1.58 CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse Memory: 4k page, physical 254228k(7184k free), swap 1052248k(1050336k free) vm_info: Java HotSpot(TM) Client VM (1.5.0-beta2-b51) for linux-x86, built on May 13 2004 03:07:37 by java_re with gcc 3.2.1-7a (J2SE release) From vt at freehold.crocodile.org Fri Jul 2 19:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jul 2 19:50:56 2004 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 20:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jul 2 20:07:15 2004 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 20:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jul 2 20:20:51 2004 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 20:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jul 2 20:38:00 2004 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 20:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jul 2 20:45:43 2004 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 21:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jul 2 21:01:14 2004 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 21:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jul 2 21:26:02 2004 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 21:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jul 2 21:31:08 2004 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Mon Jul 5 06:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon Jul 5 06:51:05 2004 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 09:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Jul 6 09:31:17 2004 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 10:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jul 6 10:09:39 2004 Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj@www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 09:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu Jul 8 09:20:57 2004 Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 09:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Jul 8 09:29:44 2004 Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 13:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu Jul 8 13:36:43 2004 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment.html From taj at www.linux.org.uk Thu Jul 8 13:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Jul 8 13:52:38 2004 Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj@www.linux.org.uk From pashmina.mukhi at patni.com Fri Jul 9 05:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri Jul 9 05:19:00 2004 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 11:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jul 9 11:15:53 2004 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 07:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri Jul 9 12:32:53 2004 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 13:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 9 12:59:04 2004 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 13:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 9 13:48:03 2004 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj@www.linux.org.uk From ogi at ogi.cl Fri Jul 9 14:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri Jul 9 14:48:22 2004 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 15:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 9 15:02:59 2004 Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 16:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jul 9 16:09:33 2004 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 20:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 9 20:04:37 2004 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 12:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon Jul 12 12:34:24 2004 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 15:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon Jul 12 15:48:44 2004 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 22:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Jul 12 22:49:52 2004 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 12:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Jul 13 12:30:44 2004 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 18:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu Jul 15 18:34:14 2004 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 10:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri Jul 16 10:25:56 2004 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 11:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri Jul 16 11:17:59 2004 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 11:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri Jul 16 11:26:11 2004 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Thu Jul 15 00:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Fri Jul 16 18:40:24 2004 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 12:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri Jul 16 18:40:27 2004 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime.bin From dmarkman at mac.com Fri Jul 16 19:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jul 16 19:08:47 2004 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Sat Jul 17 06:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat Jul 17 06:05:48 2004 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 22:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun Jul 18 21:59:08 2004 Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter@u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 12:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue Jul 20 12:07:11 2004 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 13:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue Jul 20 12:51:34 2004 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Fri Jul 23 00:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 23 01:18:51 2004 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj@www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 16:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon Jul 26 16:47:46 2004 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 17:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon Jul 26 16:56:22 2004 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 16:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue Jul 27 16:29:04 2004 Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Thu Jul 29 03:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu Jul 29 03:36:02 2004 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040729/540497ab/attachment.html From taj at www.linux.org.uk Thu Jul 29 20:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Jul 29 20:32:51 2004 Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 20:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Jul 29 20:45:08 2004 Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Fri Jul 30 02:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jul 30 02:20:59 2004 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces@linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment.html From taj at www.linux.org.uk Fri Jul 30 02:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jul 30 02:44:59 2004 Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon@alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon@alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces@linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj@www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 21:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri Jul 30 21:14:55 2004 Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Sat Jul 31 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat Jul 31 01:40:07 2004 Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 22:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:32 2005 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 13:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:32 2005 Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 18:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:32 2005 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 18:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:32 2005 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 18:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 19:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 19:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # Internal Error (53414645504F494E540E43505001C0), pid=13375, tid=1308625840 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta2-b51 mixed mode) --------------- T H R E A D --------------- Current thread (0x083c6460): JavaThread "Thread-0" [_thread_in_native_trans, id=13392] Stack: [0x4df80000,0x4e001000), sp=0x4dffff18, free space=511k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x2db403] V [libjvm.so+0x119c59] V [libjvm.so+0x27fee4] V [libjvm.so+0x2affc9] V [libjvm.so+0x1710dd] C [librxtxSerial.so+0x69bb] send_event+0x7f C [librxtxSerial.so+0x5a73] check_line_status_register+0x9f C [librxtxSerial.so+0x5e65] report_serial_events+0x1d C [librxtxSerial.so+0x6237] Java_gnu_io_RXTXPort_eventLoop+0xb7 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x16827c] V [libjvm.so+0x256038] V [libjvm.so+0x167ad5] V [libjvm.so+0x167b6e] V [libjvm.so+0x1d44f5] V [libjvm.so+0x2ae8ed] V [libjvm.so+0x256b48] C [libpthread.so.0+0x47fc] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) =>0x083c6460 JavaThread "Thread-0" [_thread_in_native_trans, id=13392] 0x081aa470 JavaThread "reader" [_thread_blocked, id=13384] 0x081abf48 JavaThread "SNMPClient" [_thread_blocked, id=13383] 0x080c4ba8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=13381] 0x080c3658 JavaThread "CompilerThread0" daemon [_thread_blocked, id=13380] 0x080c27b8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=13379] 0x080b78f8 JavaThread "Finalizer" daemon [_thread_blocked, id=13378] 0x080b6c58 JavaThread "Reference Handler" daemon [_thread_blocked, id=13377] 0x0805aba0 JavaThread "main" [_thread_blocked, id=13375] Other Threads: 0x080b2930 VMThread [id=13376] 0x080df840 WatcherThread [id=13382] VM state:synchronizing (normal execution) VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) [0x0805a038/0x0805a060] Threads_lock - owner thread: 0x080b2930 [0x0805a488/0x0805a4a0] Heap_lock - owner thread: 0x081aa470 Heap def new generation total 576K, used 514K [0x456e0000, 0x45780000, 0x45bc0000) eden space 512K, 100% used [0x456e0000, 0x45760000, 0x45760000) from space 64K, 4% used [0x45760000, 0x45760a58, 0x45770000) to space 64K, 0% used [0x45770000, 0x45770000, 0x45780000) tenured generation total 1408K, used 469K [0x45bc0000, 0x45d20000, 0x496e0000) the space 1408K, 33% used [0x45bc0000, 0x45c354c0, 0x45c35600, 0x45d20000) compacting perm gen total 8192K, used 3168K [0x496e0000, 0x49ee0000, 0x4d6e0000) the space 8192K, 38% used [0x496e0000, 0x499f82e0, 0x499f8400, 0x49ee0000) No shared spaces configured. Dynamic libraries: 00632000-00647000 r-xp 00000000 03:01 42854 /lib/ld-2.3.2.so 00647000-00648000 rw-p 00015000 03:01 42854 /lib/ld-2.3.2.so 0064a000-0077d000 r-xp 00000000 03:01 81603 /lib/tls/libc-2.3.2.so 0077d000-00781000 rw-p 00132000 03:01 81603 /lib/tls/libc-2.3.2.so 00781000-00783000 rw-p 00000000 00:00 0 00785000-007a6000 r-xp 00000000 03:01 81605 /lib/tls/libm-2.3.2.so 007a6000-007a7000 rw-p 00020000 03:01 81605 /lib/tls/libm-2.3.2.so 007a9000-007ab000 r-xp 00000000 03:01 42856 /lib/libdl-2.3.2.so 007ab000-007ac000 rw-p 00001000 03:01 42856 /lib/libdl-2.3.2.so 008b1000-008be000 r-xp 00000000 03:01 81612 /lib/tls/libpthread-0.60.so 008be000-008bf000 rw-p 0000d000 03:01 81612 /lib/tls/libpthread-0.60.so 008bf000-008c1000 rw-p 00000000 00:00 0 00cca000-00cdc000 r-xp 00000000 03:01 42915 /lib/libnsl-2.3.2.so 00cdc000-00cdd000 rw-p 00011000 03:01 42915 /lib/libnsl-2.3.2.so 00cdd000-00cdf000 rw-p 00000000 00:00 0 08048000-08056000 r-xp 00000000 03:05 246028 /usr/local/java/bin/java 08056000-08058000 rw-p 0000e000 03:05 246028 /usr/local/java/bin/java 08058000-083ed000 rwxp 00000000 00:00 0 40000000-40001000 ---p 00000000 00:00 0 40001000-40007000 r-xp 00000000 03:05 573957 /usr/local/java/jre/lib/i386/native_threads/libhpi.so 40007000-40008000 rw-p 00006000 03:05 573957 /usr/local/java/jre/lib/i386/native_threads/libhpi.so 40008000-40012000 r-xp 00000000 03:01 42876 /lib/libnss_files-2.3.2.so 40012000-40013000 rw-p 0000a000 03:01 42876 /lib/libnss_files-2.3.2.so 40013000-4001b000 rw-s 00000000 03:01 38922 /tmp/hsperfdata_root/13375 4001c000-4001e000 rw-p 00004000 00:00 0 4001e000-4033b000 r-xp 00000000 03:05 573966 /usr/local/java/jre/lib/i386/client/libjvm.so 4033b000-40359000 rw-p 0031c000 03:05 573966 /usr/local/java/jre/lib/i386/client/libjvm.so 40359000-4076e000 rw-p 00000000 00:00 0 4076e000-40779000 r-xp 00000000 03:05 573973 /usr/local/java/jre/lib/i386/libverify.so 40779000-4077a000 rw-p 0000b000 03:05 573973 /usr/local/java/jre/lib/i386/libverify.so 4077a000-4079a000 r-xp 00000000 03:05 573974 /usr/local/java/jre/lib/i386/libjava.so 4079a000-4079c000 rw-p 0001f000 03:05 573974 /usr/local/java/jre/lib/i386/libjava.so 4079c000-407af000 r-xp 00000000 03:05 573976 /usr/local/java/jre/lib/i386/libzip.so 407af000-407b1000 rw-p 00012000 03:05 573976 /usr/local/java/jre/lib/i386/libzip.so 407b1000-42d2a000 r--s 00000000 03:05 180729 /usr/local/java/jre/lib/rt.jar 42d2a000-42d92000 rw-p 00000000 00:00 0 42d92000-42e12000 r--s 00000000 03:05 180725 /usr/local/java/jre/lib/jsse.jar 42e12000-42e26000 r--s 00000000 03:05 180510 /usr/local/java/jre/lib/jce.jar 42e26000-43660000 r--s 00000000 03:05 180727 /usr/local/java/jre/lib/charsets.jar 43660000-43768000 rwxp 00000000 00:00 0 43768000-45660000 rwxp 00108000 00:00 0 45660000-45665000 rwxp 00000000 00:00 0 45665000-456e0000 rwxp 02005000 00:00 0 456e0000-45780000 rwxp 00000000 00:00 0 45780000-45bc0000 rwxp 02120000 00:00 0 45bc0000-45d20000 rwxp 00000000 00:00 0 45d20000-496e0000 rwxp 026e0000 00:00 0 496e0000-49ee0000 rwxp 00000000 00:00 0 49ee0000-4d6e0000 rwxp 06880000 00:00 0 4d6e0000-4d6e1000 rwxp 00000000 00:00 0 4d6e1000-4d6e2000 rwxp 0a081000 00:00 0 4d6e2000-4d6e4000 rwxp 00000000 00:00 0 4d6e4000-4d700000 rwxp 0a084000 00:00 0 4d700000-4d704000 rwxp 00000000 00:00 0 4d704000-4d720000 rwxp 0a0a4000 00:00 0 4d720000-4d722000 rwxp 00000000 00:00 0 4d722000-4d73f000 rwxp 00001000 00:00 0 4d73f000-4d744000 rwxp 00000000 00:00 0 4d744000-4d760000 rwxp 00023000 00:00 0 4d760000-4d761000 ---p 00000000 00:00 0 4d761000-4d7e1000 rwxp 00001000 00:00 0 4d7e1000-4d7e4000 ---p 00081000 00:00 0 4d7e4000-4d862000 rwxp 00084000 00:00 0 4d862000-4d865000 ---p 00102000 00:00 0 4d865000-4d8e3000 rwxp 00105000 00:00 0 4d8e3000-4dae3000 r--p 00000000 03:05 301033 /usr/lib/locale/locale-archive 4dae3000-4dae6000 ---p 00003000 00:00 0 4dae6000-4db64000 rwxp 00006000 00:00 0 4db64000-4db67000 ---p 00084000 00:00 0 4db67000-4dbe5000 rwxp 00087000 00:00 0 4dbe5000-4dbe8000 ---p 00105000 00:00 0 4dbe8000-4dc66000 rwxp 00108000 00:00 0 4dc66000-4dc67000 ---p 00186000 00:00 0 4dc67000-4dce7000 rwxp 00187000 00:00 0 4dce7000-4dd0d000 r--s 00000000 03:05 574014 /usr/local/java/jre/lib/ext/sunjce_provider.jar 4dd0d000-4dd38000 r--s 00000000 03:05 574015 /usr/local/java/jre/lib/ext/sunpkcs11.jar 4dd38000-4dd3a000 r--s 00000000 03:05 574016 /usr/local/java/jre/lib/ext/dnsns.jar 4dd3a000-4ddfe000 r--s 00000000 03:05 574017 /usr/local/java/jre/lib/ext/localedata.jar 4ddfe000-4de64000 r--s 00000000 03:05 573924 /usr/local/java/jre/lib/ext/OneWireAPI.jar 4de64000-4de73000 r--s 00000000 03:05 573944 /usr/local/java/jre/lib/ext/RXTXcomm.jar 4de73000-4de76000 ---p 00003000 00:00 0 4de76000-4def4000 rwxp 00006000 00:00 0 4def4000-4def7000 ---p 00084000 00:00 0 4def7000-4df75000 rwxp 00087000 00:00 0 4df75000-4df7f000 r-xp 00000000 03:05 579296 /usr/local/java/jre/lib/i386/librxtxSerial-2.1-7pre17.so 4df7f000-4df80000 rw-p 00009000 03:05 579296 /usr/local/java/jre/lib/i386/librxtxSerial-2.1-7pre17.so 4df80000-4df83000 ---p 00003000 00:00 0 4df83000-4e001000 rwxp 00006000 00:00 0 bfe00000-bfe03000 ---p 00000000 00:00 0 bfe03000-c0000000 rwxp ffe04000 00:00 0 VM Arguments: java_command: Tempd Environment Variables: PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin LD_LIBRARY_PATH=/usr/local/java/jre/lib/i386/client:/usr/local/java/jre/lib/i386:/usr/local/java/jre/../lib/i386 SHELL=/bin/bash --------------- S Y S T E M --------------- OS:Fedora Core release 1 (Yarrow) uname:Linux 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 libc:glibc 2.3.2 NPTL 0.60 rlimit: STACK 10240k, CORE 0k, NPROC 2037, NOFILE 1024, AS infinity load average:2.14 2.12 1.58 CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse Memory: 4k page, physical 254228k(7184k free), swap 1052248k(1050336k free) vm_info: Java HotSpot(TM) Client VM (1.5.0-beta2-b51) for linux-x86, built on May 13 2004 03:07:37 by java_re with gcc 3.2.1-7a (J2SE release) From vt at freehold.crocodile.org Fri Jul 2 19:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 20:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 20:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 20:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 20:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 21:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 21:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 21:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Mon Jul 5 06:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 09:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:33 2005 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 10:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj@www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 09:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 09:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 13:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment.htm From taj at www.linux.org.uk Thu Jul 8 13:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj@www.linux.org.uk From pashmina.mukhi at patni.com Fri Jul 9 05:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 11:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 07:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 13:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 13:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj@www.linux.org.uk From ogi at ogi.cl Fri Jul 9 14:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 15:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 16:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 17:46:34 2005 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 20:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 12:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 15:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 22:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 12:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 18:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 10:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 11:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri Jun 3 17:46:35 2005 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 11:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri Jun 3 17:46:35 2005 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Thu Jul 15 00:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 12:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0002.bin From dmarkman at mac.com Fri Jul 16 19:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Sat Jul 17 06:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 22:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter@u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 12:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Fri Jun 3 17:46:35 2005 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 13:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Fri Jul 23 00:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj@www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 16:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 17:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 16:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Thu Jul 29 03:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040729/540497ab/attachment.htm From taj at www.linux.org.uk Thu Jul 29 20:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 20:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Fri Jul 30 02:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces@linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment.htm From taj at www.linux.org.uk Fri Jul 30 02:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon@alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon@alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces@linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj@www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 21:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri Jun 3 17:46:36 2005 Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Sat Jul 31 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:37 2005 Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 22:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:55 2005 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 13:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:55 2005 Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 18:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:55 2005 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 18:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:55 2005 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 18:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:55 2005 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 19:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:55 2005 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 19:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- # # An unexpected error has been detected by HotSpot Virtual Machine: # # Internal Error (53414645504F494E540E43505001C0), pid=13375, tid=1308625840 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-beta2-b51 mixed mode) --------------- T H R E A D --------------- Current thread (0x083c6460): JavaThread "Thread-0" [_thread_in_native_trans, id=13392] Stack: [0x4df80000,0x4e001000), sp=0x4dffff18, free space=511k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x2db403] V [libjvm.so+0x119c59] V [libjvm.so+0x27fee4] V [libjvm.so+0x2affc9] V [libjvm.so+0x1710dd] C [librxtxSerial.so+0x69bb] send_event+0x7f C [librxtxSerial.so+0x5a73] check_line_status_register+0x9f C [librxtxSerial.so+0x5e65] report_serial_events+0x1d C [librxtxSerial.so+0x6237] Java_gnu_io_RXTXPort_eventLoop+0xb7 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x16827c] V [libjvm.so+0x256038] V [libjvm.so+0x167ad5] V [libjvm.so+0x167b6e] V [libjvm.so+0x1d44f5] V [libjvm.so+0x2ae8ed] V [libjvm.so+0x256b48] C [libpthread.so.0+0x47fc] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) =>0x083c6460 JavaThread "Thread-0" [_thread_in_native_trans, id=13392] 0x081aa470 JavaThread "reader" [_thread_blocked, id=13384] 0x081abf48 JavaThread "SNMPClient" [_thread_blocked, id=13383] 0x080c4ba8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=13381] 0x080c3658 JavaThread "CompilerThread0" daemon [_thread_blocked, id=13380] 0x080c27b8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=13379] 0x080b78f8 JavaThread "Finalizer" daemon [_thread_blocked, id=13378] 0x080b6c58 JavaThread "Reference Handler" daemon [_thread_blocked, id=13377] 0x0805aba0 JavaThread "main" [_thread_blocked, id=13375] Other Threads: 0x080b2930 VMThread [id=13376] 0x080df840 WatcherThread [id=13382] VM state:synchronizing (normal execution) VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) [0x0805a038/0x0805a060] Threads_lock - owner thread: 0x080b2930 [0x0805a488/0x0805a4a0] Heap_lock - owner thread: 0x081aa470 Heap def new generation total 576K, used 514K [0x456e0000, 0x45780000, 0x45bc0000) eden space 512K, 100% used [0x456e0000, 0x45760000, 0x45760000) from space 64K, 4% used [0x45760000, 0x45760a58, 0x45770000) to space 64K, 0% used [0x45770000, 0x45770000, 0x45780000) tenured generation total 1408K, used 469K [0x45bc0000, 0x45d20000, 0x496e0000) the space 1408K, 33% used [0x45bc0000, 0x45c354c0, 0x45c35600, 0x45d20000) compacting perm gen total 8192K, used 3168K [0x496e0000, 0x49ee0000, 0x4d6e0000) the space 8192K, 38% used [0x496e0000, 0x499f82e0, 0x499f8400, 0x49ee0000) No shared spaces configured. Dynamic libraries: 00632000-00647000 r-xp 00000000 03:01 42854 /lib/ld-2.3.2.so 00647000-00648000 rw-p 00015000 03:01 42854 /lib/ld-2.3.2.so 0064a000-0077d000 r-xp 00000000 03:01 81603 /lib/tls/libc-2.3.2.so 0077d000-00781000 rw-p 00132000 03:01 81603 /lib/tls/libc-2.3.2.so 00781000-00783000 rw-p 00000000 00:00 0 00785000-007a6000 r-xp 00000000 03:01 81605 /lib/tls/libm-2.3.2.so 007a6000-007a7000 rw-p 00020000 03:01 81605 /lib/tls/libm-2.3.2.so 007a9000-007ab000 r-xp 00000000 03:01 42856 /lib/libdl-2.3.2.so 007ab000-007ac000 rw-p 00001000 03:01 42856 /lib/libdl-2.3.2.so 008b1000-008be000 r-xp 00000000 03:01 81612 /lib/tls/libpthread-0.60.so 008be000-008bf000 rw-p 0000d000 03:01 81612 /lib/tls/libpthread-0.60.so 008bf000-008c1000 rw-p 00000000 00:00 0 00cca000-00cdc000 r-xp 00000000 03:01 42915 /lib/libnsl-2.3.2.so 00cdc000-00cdd000 rw-p 00011000 03:01 42915 /lib/libnsl-2.3.2.so 00cdd000-00cdf000 rw-p 00000000 00:00 0 08048000-08056000 r-xp 00000000 03:05 246028 /usr/local/java/bin/java 08056000-08058000 rw-p 0000e000 03:05 246028 /usr/local/java/bin/java 08058000-083ed000 rwxp 00000000 00:00 0 40000000-40001000 ---p 00000000 00:00 0 40001000-40007000 r-xp 00000000 03:05 573957 /usr/local/java/jre/lib/i386/native_threads/libhpi.so 40007000-40008000 rw-p 00006000 03:05 573957 /usr/local/java/jre/lib/i386/native_threads/libhpi.so 40008000-40012000 r-xp 00000000 03:01 42876 /lib/libnss_files-2.3.2.so 40012000-40013000 rw-p 0000a000 03:01 42876 /lib/libnss_files-2.3.2.so 40013000-4001b000 rw-s 00000000 03:01 38922 /tmp/hsperfdata_root/13375 4001c000-4001e000 rw-p 00004000 00:00 0 4001e000-4033b000 r-xp 00000000 03:05 573966 /usr/local/java/jre/lib/i386/client/libjvm.so 4033b000-40359000 rw-p 0031c000 03:05 573966 /usr/local/java/jre/lib/i386/client/libjvm.so 40359000-4076e000 rw-p 00000000 00:00 0 4076e000-40779000 r-xp 00000000 03:05 573973 /usr/local/java/jre/lib/i386/libverify.so 40779000-4077a000 rw-p 0000b000 03:05 573973 /usr/local/java/jre/lib/i386/libverify.so 4077a000-4079a000 r-xp 00000000 03:05 573974 /usr/local/java/jre/lib/i386/libjava.so 4079a000-4079c000 rw-p 0001f000 03:05 573974 /usr/local/java/jre/lib/i386/libjava.so 4079c000-407af000 r-xp 00000000 03:05 573976 /usr/local/java/jre/lib/i386/libzip.so 407af000-407b1000 rw-p 00012000 03:05 573976 /usr/local/java/jre/lib/i386/libzip.so 407b1000-42d2a000 r--s 00000000 03:05 180729 /usr/local/java/jre/lib/rt.jar 42d2a000-42d92000 rw-p 00000000 00:00 0 42d92000-42e12000 r--s 00000000 03:05 180725 /usr/local/java/jre/lib/jsse.jar 42e12000-42e26000 r--s 00000000 03:05 180510 /usr/local/java/jre/lib/jce.jar 42e26000-43660000 r--s 00000000 03:05 180727 /usr/local/java/jre/lib/charsets.jar 43660000-43768000 rwxp 00000000 00:00 0 43768000-45660000 rwxp 00108000 00:00 0 45660000-45665000 rwxp 00000000 00:00 0 45665000-456e0000 rwxp 02005000 00:00 0 456e0000-45780000 rwxp 00000000 00:00 0 45780000-45bc0000 rwxp 02120000 00:00 0 45bc0000-45d20000 rwxp 00000000 00:00 0 45d20000-496e0000 rwxp 026e0000 00:00 0 496e0000-49ee0000 rwxp 00000000 00:00 0 49ee0000-4d6e0000 rwxp 06880000 00:00 0 4d6e0000-4d6e1000 rwxp 00000000 00:00 0 4d6e1000-4d6e2000 rwxp 0a081000 00:00 0 4d6e2000-4d6e4000 rwxp 00000000 00:00 0 4d6e4000-4d700000 rwxp 0a084000 00:00 0 4d700000-4d704000 rwxp 00000000 00:00 0 4d704000-4d720000 rwxp 0a0a4000 00:00 0 4d720000-4d722000 rwxp 00000000 00:00 0 4d722000-4d73f000 rwxp 00001000 00:00 0 4d73f000-4d744000 rwxp 00000000 00:00 0 4d744000-4d760000 rwxp 00023000 00:00 0 4d760000-4d761000 ---p 00000000 00:00 0 4d761000-4d7e1000 rwxp 00001000 00:00 0 4d7e1000-4d7e4000 ---p 00081000 00:00 0 4d7e4000-4d862000 rwxp 00084000 00:00 0 4d862000-4d865000 ---p 00102000 00:00 0 4d865000-4d8e3000 rwxp 00105000 00:00 0 4d8e3000-4dae3000 r--p 00000000 03:05 301033 /usr/lib/locale/locale-archive 4dae3000-4dae6000 ---p 00003000 00:00 0 4dae6000-4db64000 rwxp 00006000 00:00 0 4db64000-4db67000 ---p 00084000 00:00 0 4db67000-4dbe5000 rwxp 00087000 00:00 0 4dbe5000-4dbe8000 ---p 00105000 00:00 0 4dbe8000-4dc66000 rwxp 00108000 00:00 0 4dc66000-4dc67000 ---p 00186000 00:00 0 4dc67000-4dce7000 rwxp 00187000 00:00 0 4dce7000-4dd0d000 r--s 00000000 03:05 574014 /usr/local/java/jre/lib/ext/sunjce_provider.jar 4dd0d000-4dd38000 r--s 00000000 03:05 574015 /usr/local/java/jre/lib/ext/sunpkcs11.jar 4dd38000-4dd3a000 r--s 00000000 03:05 574016 /usr/local/java/jre/lib/ext/dnsns.jar 4dd3a000-4ddfe000 r--s 00000000 03:05 574017 /usr/local/java/jre/lib/ext/localedata.jar 4ddfe000-4de64000 r--s 00000000 03:05 573924 /usr/local/java/jre/lib/ext/OneWireAPI.jar 4de64000-4de73000 r--s 00000000 03:05 573944 /usr/local/java/jre/lib/ext/RXTXcomm.jar 4de73000-4de76000 ---p 00003000 00:00 0 4de76000-4def4000 rwxp 00006000 00:00 0 4def4000-4def7000 ---p 00084000 00:00 0 4def7000-4df75000 rwxp 00087000 00:00 0 4df75000-4df7f000 r-xp 00000000 03:05 579296 /usr/local/java/jre/lib/i386/librxtxSerial-2.1-7pre17.so 4df7f000-4df80000 rw-p 00009000 03:05 579296 /usr/local/java/jre/lib/i386/librxtxSerial-2.1-7pre17.so 4df80000-4df83000 ---p 00003000 00:00 0 4df83000-4e001000 rwxp 00006000 00:00 0 bfe00000-bfe03000 ---p 00000000 00:00 0 bfe03000-c0000000 rwxp ffe04000 00:00 0 VM Arguments: java_command: Tempd Environment Variables: PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin LD_LIBRARY_PATH=/usr/local/java/jre/lib/i386/client:/usr/local/java/jre/lib/i386:/usr/local/java/jre/../lib/i386 SHELL=/bin/bash --------------- S Y S T E M --------------- OS:Fedora Core release 1 (Yarrow) uname:Linux 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 libc:glibc 2.3.2 NPTL 0.60 rlimit: STACK 10240k, CORE 0k, NPROC 2037, NOFILE 1024, AS infinity load average:2.14 2.12 1.58 CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse Memory: 4k page, physical 254228k(7184k free), swap 1052248k(1050336k free) vm_info: Java HotSpot(TM) Client VM (1.5.0-beta2-b51) for linux-x86, built on May 13 2004 03:07:37 by java_re with gcc 3.2.1-7a (J2SE release) From vt at freehold.crocodile.org Fri Jul 2 19:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 20:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 20:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 20:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 20:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 21:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 21:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 21:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Mon Jul 5 06:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 09:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 10:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj@www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 09:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 09:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:56 2005 Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 13:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0001.htm From taj at www.linux.org.uk Thu Jul 8 13:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj@www.linux.org.uk From pashmina.mukhi at patni.com Fri Jul 9 05:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 11:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 07:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 13:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 13:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj@www.linux.org.uk From ogi at ogi.cl Fri Jul 9 14:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 15:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 16:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 20:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 12:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 15:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 22:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:57 2005 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj@www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 12:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 18:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 10:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 11:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri Jun 3 18:08:58 2005 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 11:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri Jun 3 18:08:58 2005 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Thu Jul 15 00:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 12:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0003.bin From dmarkman at mac.com Fri Jul 16 19:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Sat Jul 17 06:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 22:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter@u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 12:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 13:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Fri Jul 23 00:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj@www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 16:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Fri Jun 3 18:08:58 2005 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 17:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 16:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Thu Jul 29 03:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0001.htm From taj at www.linux.org.uk Thu Jul 29 20:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 20:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Fri Jul 30 02:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces@linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0001.htm From taj at www.linux.org.uk Fri Jul 30 02:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon@alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon@alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces@linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon@alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj@www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 21:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Sat Jul 31 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:59 2005 Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj@www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0141.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0395.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0395.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0395.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0395.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0392.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0396.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0396.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0396.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0396.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0393.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0397.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0397.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0397.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0397.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0394.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0398.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0398.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0398.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0398.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0395.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0399.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0399.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0399.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0399.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0396.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0400.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0400.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0400.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0400.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0397.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0401.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0401.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0401.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0401.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0398.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0402.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0402.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0402.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0402.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0399.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0403.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0403.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0403.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0403.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0400.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0404.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0404.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0404.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0404.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0001.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0001.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0001.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0001.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0001.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0002.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0002.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0002.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0002.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0002.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0003.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0003.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0003.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0003.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0003.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0004.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0004.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0004.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0004.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0004.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0005.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0005.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0005.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0005.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0005.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0006.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0006.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0006.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0006.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0006.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0007.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0007.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0007.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0007.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0007.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0008.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0008.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0008.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0008.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0008.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0009.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0009.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0009.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0009.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0009.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0010.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0010.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0010.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0010.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0010.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0001.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0001.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0001.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0001.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0001.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0002.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0002.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0002.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0002.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0002.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0003.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0003.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0003.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0003.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0003.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0004.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0004.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0004.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0004.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0004.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0005.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0005.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0005.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0005.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0005.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0006.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0006.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0006.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0006.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0006.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0007.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0007.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0007.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0007.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0007.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0008.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0008.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0008.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0008.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0008.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0009.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0009.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0009.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0009.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0009.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0010.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0010.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0010.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0010.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0010.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0001.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0001.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0001.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0001.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0001.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0002.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0002.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0002.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0002.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0002.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0003.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0003.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0003.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0003.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0003.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0004.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0004.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0004.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0004.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0004.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0005.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0005.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0005.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0005.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0005.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0006.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0006.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0006.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0006.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0006.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0007.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0007.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0007.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0007.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0007.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0008.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0008.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0008.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0008.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0008.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0009.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0009.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0009.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0009.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0009.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0010.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0010.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0010.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0010.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0010.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0011.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0011.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0011.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0011.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0011.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0012.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0012.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0012.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0012.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0012.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0013.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0013.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0013.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0013.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0013.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0014.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0014.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0014.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0014.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0014.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0015.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0015.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0015.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0015.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0015.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0016.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0016.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0016.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0016.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0016.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0017.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0017.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0017.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0017.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0017.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0018.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0018.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0018.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0018.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0018.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0019.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0019.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0019.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0019.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0019.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0020.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0020.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0020.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0020.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0020.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0021.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0021.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0021.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0021.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0021.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0022.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0022.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0022.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0022.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0022.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0023.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0023.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0023.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0023.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0023.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks for the help. That was the problem. the make install script didn't copy the RXTXcomm.jar to /usr/local/java/jre/lib/ext/ after I made the changes to Makefile. It put the file in / . The program runs now with RXTX version 2.1-7pre17 and Java SDK 1.5.0. Thanks for the help. From jnelson at burntmail.com Fri Jul 2 12:41:30 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:41:30 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. Message-ID: <40E5AC5A.1050304@burntmail.com> Sorry to flood with so many questions, but This is another problem i've been having for a while now. If I allow my program to run for some time, it crashes and generates the attached log file. It seems that it is running out of 'eden' space. Is this a memory leak? I can increase the memory size using -X flags passed to java,but that solution still crashes, just less often (takes longer to fill the space i suppose). My program is multithreaded, so it may be a problem with my implementation, but i use synchrnoized code blocks to pass locks to data objects so I hope it doesn't involve my code (directly). Thanks, Jake -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid13375.log Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20040702/251bdabe/hs_err_pid13375-0024.pl From vt at freehold.crocodile.org Fri Jul 2 12:50:43 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 11:50:43 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5AC5A.1050304@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> Message-ID: <20040702185043.GA12609@freehold.crocodile.org> Hello Jake, > Sorry to flood with so many questions, but This is another problem i've > been having for a while now. Did this problem appear when you started using RxTx? The dump looks pretty much the same as I'm getting when I try RxTx 2.* versions, though I can't tell for sure since it's been a while since I tried it. > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. This is above my understanding. > Is this a memory leak? If it is, it's unlikely to happen because of your Java mistakes - in that case, you usually get OutOfMemoryError. This is definitely a JNI code problem. Most probably a stray pointer, or a mismatch between Java objects created in Java space and JNI space. > I can increase the memory size using -X flags passed to java,but that > solution still crashes, just less often (takes longer to fill the space i > suppose). My program is multithreaded, so it may be a problem with my > implementation, but i use synchrnoized code blocks to pass locks to data > objects so I hope it doesn't involve my code (directly). I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 and see if the problem persists. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:11:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:11:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702185043.GA12609@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> Message-ID: <40E5B36E.4070806@burntmail.com> Vadim Tkachenko wrote: >Hello Jake, > > > >>Sorry to flood with so many questions, but This is another problem i've >>been having for a while now. >> >> > >Did this problem appear when you started using RxTx? The dump looks pretty >much the same as I'm getting when I try RxTx 2.* versions, though I can't >tell for sure since it's been a while since I tried it. > > > >>If I allow my program to run for some time, it crashes and generates the >>attached log file. It seems that it is running out of 'eden' space. >> >> > >This is above my understanding. > > > >>Is this a memory leak? >> >> > >If it is, it's unlikely to happen because of your Java mistakes - in that >case, you usually get OutOfMemoryError. This is definitely a JNI code >problem. Most probably a stray pointer, or a mismatch between Java objects >created in Java space and JNI space. > > > >>I can increase the memory size using -X flags passed to java,but that >>solution still crashes, just less often (takes longer to fill the space i >>suppose). My program is multithreaded, so it may be a problem with my >>implementation, but i use synchrnoized code blocks to pass locks to data >>objects so I hope it doesn't involve my code (directly). >> >> > >I doubt it's your code. First thing to try is to downgrade RxTx to 1.4-15 >and see if the problem persists. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I just tired to compile version rxtx-1.4-15 and I got the follow message after I ran make: Error: No output directory was specified on the command line. Try -help. make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 Which is why i was using version 2 to begin with, but if you know what is causing this problem that would be great. Thanks, Jake From vt at freehold.crocodile.org Fri Jul 2 13:24:55 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:24:55 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5B36E.4070806@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> Message-ID: <20040702192454.GA12840@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > I just tired to compile version rxtx-1.4-15 and I got the follow message > after I ran make: > > Error: No output directory was specified on the command line. Try -help. > make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 > > Which is why i was using version 2 to begin with, but if you know what > is causing this problem that would be great. Don't remember if this is the fix for the specific problem you're having, but here's a patch that solved the problem on one of my boxes: --- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 +++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 @@ -31,7 +31,7 @@ LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) ####################### dirs SPATH = $(srcdir)/src -DEST=$(target_alias) +DEST=linux ####################### rules CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) javafiles = $(wildcard $(SPATH)/*.java) This patch most probably breaks cross-compilation and has a number of unfortunate side effects, but it allows to compile and install it. Trent - would you even consider getting 1.4-15 to compile on modern boxes? I've tried to do that several times, but since the build framework is much more portable than anything I ever worked with. It seems that recent changes with autoconf, automake and libtool break the 1.4* build process beyond repair. For me, there's a good reason to stay with 1.4-15 - it is proven stable, unlike 2.* releases. I'd really appreciate if you could consider reanimating it, at least as far as build is concerned. > Jake --vt From jnelson at burntmail.com Fri Jul 2 13:42:24 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 15:42:24 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702192454.GA12840@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> Message-ID: <40E5BAA0.8020507@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:11:42PM -0400, Jake Nelson wrote: > > > >>I just tired to compile version rxtx-1.4-15 and I got the follow message >>after I ran make: >> >>Error: No output directory was specified on the command line. Try -help. >>make: *** [/home/jaknel/rxtx-1.4-15/gnu/io/Configure.class] Error 15 >> >>Which is why i was using version 2 to begin with, but if you know what >>is causing this problem that would be great. >> >> > >Don't remember if this is the fix for the specific problem you're having, >but here's a patch that solved the problem on one of my boxes: > >--- Makefile.am~ 2004-06-30 14:11:29.000000000 -0700 >+++ Makefile.am 2004-06-30 14:11:32.000000000 -0700 >@@ -31,7 +31,7 @@ > LIBTOOL_INST=$(TOP)/libtool --mode=install $(INSTALL_PROGRAM) > ####################### dirs > SPATH = $(srcdir)/src >-DEST=$(target_alias) >+DEST=linux > ####################### rules > CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java)) > javafiles = $(wildcard $(SPATH)/*.java) > >This patch most probably breaks cross-compilation and has a number of >unfortunate side effects, but it allows to compile and install it. > > >Trent - would you even consider getting 1.4-15 to compile on modern boxes? >I've tried to do that several times, but since the build framework is much >more portable than anything I ever worked with. > >It seems that recent changes with autoconf, automake and libtool break the >1.4* build process beyond repair. > >For me, there's a good reason to stay with 1.4-15 - it is proven stable, >unlike 2.* releases. > >I'd really appreciate if you could consider reanimating it, at least as far >as build is concerned. > > > >>Jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well that patch was helpful, a bit, but the it still doesn't complete the make, i get the follow output (It's only the last bit a lines) ---------------------------- linux-gnu ---------------------------- configure: creating ./config.status cd . \ && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status config.status: creating Makefile config.status: executing depfiles commands cd . && autoheader WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java ./src/RXTXPort.java ./src/RXTXVersion.java Note: * uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /usr/local/java//bin/jar cf jcl.jar gnu/* libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. make: *** [/libSerial.la] Error 1 Any help would be appreciated. -Jake From vt at freehold.crocodile.org Fri Jul 2 13:48:06 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 12:48:06 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5BAA0.8020507@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> Message-ID: <20040702194806.GA13035@freehold.crocodile.org> On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > configure: creating ./config.status > cd . \ > && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > cd . && autoheader > WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' > WARNING: and `config.h.top', to define templates for `config.h.in' > WARNING: is deprecated and discouraged. For this, you'd have to downgrade autoconf to 2.53 - not to break the existing system, I'd suggest you get the source and install it in, say, /opt/GNU and then fix the path when compiling RxTx > WARNING: Using the third argument of `AC_DEFINE' and > WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without > WARNING: `acconfig.h': > > WARNING: AC_DEFINE([NEED_MAIN], 1, > WARNING: [Define if a function `main' is needed.]) > > WARNING: More sophisticated templates can also be produced, see the > WARNING: documentation. These mostly can be ignored > touch ./config.h.in > cd . && /bin/sh ./config.status config.h > config.status: creating config.h > /usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O > ./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java > ./src/RXTXPort.java ./src/RXTXVersion.java > Note: * uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > /usr/local/java//bin/jar cf jcl.jar gnu/* > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > make: *** [/libSerial.la] Error 1 Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same as above. > -Jake From jnelson at burntmail.com Fri Jul 2 14:05:42 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:05:42 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702194806.GA13035@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> Message-ID: <40E5C016.2060306@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 03:42:24PM -0400, Jake Nelson wrote: > > > >>configure: creating ./config.status >>cd . \ >> && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status >>config.status: creating Makefile >>config.status: executing depfiles commands >>cd . && autoheader >>WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' >>WARNING: and `config.h.top', to define templates for `config.h.in' >>WARNING: is deprecated and discouraged. >> >> > >For this, you'd have to downgrade autoconf to 2.53 - not to break the >existing system, I'd suggest you get the source and install it in, say, >/opt/GNU and then fix the path when compiling RxTx > > > >>WARNING: Using the third argument of `AC_DEFINE' and >>WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without >>WARNING: `acconfig.h': >> >>WARNING: AC_DEFINE([NEED_MAIN], 1, >>WARNING: [Define if a function `main' is needed.]) >> >>WARNING: More sophisticated templates can also be produced, see the >>WARNING: documentation. >> >> > >These mostly can be ignored > > > >>touch ./config.h.in >>cd . && /bin/sh ./config.status config.h >>config.status: creating config.h >>/usr/local/java//bin/javac -classpath .: -d /home/jaknel/rxtx-1.4-15/ -O >>./src/Configure.java ./src/LPRPort.java ./src/RXTXCommDriver.java >>./src/RXTXPort.java ./src/RXTXVersion.java >>Note: * uses or overrides a deprecated API. >>Note: Recompile with -Xlint:deprecation for details. >>/usr/local/java//bin/jar cf jcl.jar gnu/* >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >>make: *** [/libSerial.la] Error 1 >> >> > >Well, in order to fix this, you have to downgrade the libtool to 1.3.5. Same >as above. > > > >>-Jake >> >> >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > well I got as far as make install now (after downgrading all my gnu tools, gnu.org is dead by the way for me.) now make install gives me this: gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/SerialImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/SerialImp.lo ../src/SerialImp.c:3418:31: missing terminating " character ../src/SerialImp.c: In function `check_lock_status': ../src/SerialImp.c:3420: error: syntax error before "please" ../src/SerialImp.c:3420: error: stray '\' in program ../src/SerialImp.c:3420:77: missing terminating " character rm -fr .libs/libSerial.la .libs/libSerial.* .libs/libSerial-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libSerial-1.4.15.so -o .libs/libSerial-1.4.15.so (cd .libs && rm -f libSerial.so && ln -s libSerial-1.4.15.so libSerial.so) creating libSerial.la (cd .libs && rm -f libSerial.la && ln -s ../libSerial.la libSerial.la) gcc -I/home/jaknel/rxtx-1.4-15 -Ilinux -I. -I/usr/local/java/include -I/usr/local/java/include/./linux/ -g -O2 -D_POSIX_SOURCE -DDISABLE_LOCKFILES -D_BSD_SOURCE -D__need_timespec -c .././src/ParallelImp.c -fPIC -DPIC -o /home/jaknel/rxtx-1.4-15/linux/ParallelImp.lo rm -fr .libs/libParallel.la .libs/libParallel.* .libs/libParallel-1.4.15.* gcc -shared -lc -Wl,-soname -Wl,libParallel-1.4.15.so -o .libs/libParallel-1.4.15.so (cd .libs && rm -f libParallel.so && ln -s libParallel-1.4.15.so libParallel.so) creating libParallel.la (cd .libs && rm -f libParallel.la && ln -s ../libParallel.la libParallel.la) make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' make[1]: Nothing to be done for `install-exec-am'. make[1]: Nothing to be done for `install-data-am'. make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' libtool: install: no file or destination specified Try `libtool --help --mode=install' for more information. make: *** [install] Error 1 Any ideas? Thanks, jake From vt at freehold.crocodile.org Fri Jul 2 14:30:12 2004 From: vt at freehold.crocodile.org (Vadim Tkachenko) Date: Fri, 2 Jul 2004 13:30:12 -0700 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <40E5C016.2060306@burntmail.com> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> Message-ID: <20040702203012.GB13286@freehold.crocodile.org> On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > well I got as far as make install now (after downgrading all my gnu > tools, gnu.org is dead by the way for me.) > > now make install gives me this: [skipped] > make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' > make[1]: Nothing to be done for `install-exec-am'. > make[1]: Nothing to be done for `install-data-am'. > make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' > libtool: install: no file or destination specified > Try `libtool --help --mode=install' for more information. > make: *** [install] Error 1 > > > Any ideas? If I'm not mistaken, the solution for that was posted here within last 24 hours. If not, just manually copy the .so files to where they should be. > Thanks, jake --vt From jnelson at burntmail.com Fri Jul 2 14:35:35 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 16:35:35 -0400 Subject: [Rxtx] JVM crash, 100% eden space used. In-Reply-To: <20040702203012.GB13286@freehold.crocodile.org> References: <40E5AC5A.1050304@burntmail.com> <20040702185043.GA12609@freehold.crocodile.org> <40E5B36E.4070806@burntmail.com> <20040702192454.GA12840@freehold.crocodile.org> <40E5BAA0.8020507@burntmail.com> <20040702194806.GA13035@freehold.crocodile.org> <40E5C016.2060306@burntmail.com> <20040702203012.GB13286@freehold.crocodile.org> Message-ID: <40E5C717.2000208@burntmail.com> Vadim Tkachenko wrote: >On Fri, Jul 02, 2004 at 04:05:42PM -0400, Jake Nelson wrote: > > > >>well I got as far as make install now (after downgrading all my gnu >>tools, gnu.org is dead by the way for me.) >> >>now make install gives me this: >> >> > >[skipped] > > > >>make[1]: Entering directory `/home/jaknel/rxtx-1.4-15' >>make[1]: Nothing to be done for `install-exec-am'. >>make[1]: Nothing to be done for `install-data-am'. >>make[1]: Leaving directory `/home/jaknel/rxtx-1.4-15' >>libtool: install: no file or destination specified >>Try `libtool --help --mode=install' for more information. >>make: *** [install] Error 1 >> >> >>Any ideas? >> >> > >If I'm not mistaken, the solution for that was posted here within last 24 >hours. If not, just manually copy the .so files to where they should be. > > > >>Thanks, jake >> >> > >--vt >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > I've only been on the list for the passed 4 hours :) Anyway, thanks From ari.suutari at syncrontech.com Sun Jul 4 23:56:03 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Mon, 5 Jul 2004 08:56:03 +0300 Subject: [Rxtx] JVM crash, 100% eden space used. References: <40E5AC5A.1050304@burntmail.com> Message-ID: <050001c46254$c35c5680$2508473e@sad.syncrontech.com> Hi, > If I allow my program to run for some time, it crashes and generates the > attached log file. It seems that it is running out of 'eden' space. Is > C [librxtxSerial.so+0x69bb] send_event+0x7f This is because of a bug in rxtx JNI code (it caches JNIEnv pointer, which is not allowed). While waiting for fix, you can try to comment out line which says " send_event( eis, SPE_OUTPUT_BUFFER_EMPTY, 1 );" It is in SerialImp.c, line 1438. If I remember correctly with this kludge I was able to use 1-wire devices with rxtx. After this the "output buffer empty" event no longer works but I think that 1-wire api library does not use it. Ari S. From ricardo.trindade at emation.pt Tue Jul 6 02:36:30 2004 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue, 6 Jul 2004 09:36:30 +0100 Subject: [Rxtx] stable release status Message-ID: Hi, What is the status of the stable relase ? Will the native libraries be included in the jar, like it has been discussed on the list ? This would be an important enhancement for us. thanks, Ricardo From taj at www.linux.org.uk Tue Jul 6 03:15:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 6 Jul 2004 10:15:00 +0100 (BST) Subject: [Rxtx] stable release status In-Reply-To: References: Message-ID: On Tue, 6 Jul 2004, Ricardo Trindade wrote: > Hi, > > What is the status of the stable relase ? > Will the native libraries be included in the jar, like it has been > discussed on the list ? > > This would be an important enhancement for us. > > thanks, > Ricardo > Hi Ricardo I've been looking at the problem regarding the output buffer empty thread in 2.*. I've not found an easy solution to the problem using native threads. I'm not sure that it is possible using native threads. Documentation on the Internet is fairly thin in this regard. It is possible if rxtx was invoking the JRE is my understanding. Thats not a solution :) What I'm planning on doing is moving the native threads up into Java. There is no problem with the pointers into the JVM at that point. The event info struct will no longer be needed for pointers into the JVM then. There has been discussion regarding 1.4/5 rxtx being suitable for some. I hardly have time for the 2.* series let along double that. But patches are welcome and will be released. The problem the 1.* rxtx will run into is the same one rxtx 2.* addresses. Many OS's and many drivers in Linux do not give access to the reigisters on the serial ports to determine when output buffers are empty. So while the rxtx 1.4 works well for some, its completely nonfunctional for some using output buffer empty events. As this is going on, I'm upgrading the build/test environments here. Its a little more complicated than one would hope and has been a pain. Linux 2.4,opteron, lvm1,broken vmware (no windows) -> Linux 2.6, 64 bit opteron,lvm2,vmware 4.52 (works?/beta like) This is needed to run the tests we normally do for releases. The intent is to open this machine up to rxtx development when its complete. http://bugzilla.qbang.org/, a tinder box like setup to test w32*,Linux* But yes. I would like to release an easier to install rxtx. The main concern is making sure the next release is fairly solid for Java 1.5/5.0 -- Trent Jarvi taj at www.linux.org.uk From shresthavijay01 at yahoo.com Thu Jul 8 02:18:04 2004 From: shresthavijay01 at yahoo.com (vijay shrestha) Date: Thu, 8 Jul 2004 01:18:04 -0700 (PDT) Subject: [Rxtx] help need regarding rxtx Message-ID: <20040708081804.28170.qmail@web40805.mail.yahoo.com> i am a newbie in java commmunication api programming, i have installed rxtx and java comm api from sun for solaris on my fedora core system. i am trying to make my computer dial to a phone line, can you help me how to do that. can you give some code snippets to make sure that my rxtx is taking modem. i have modem ame-tt series(acer external 56 modem). thank you vijay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Thu Jul 8 02:35:37 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 09:35:37 +0100 (BST) Subject: [Rxtx] help need regarding rxtx In-Reply-To: <20040708081804.28170.qmail@web40805.mail.yahoo.com> References: <20040708081804.28170.qmail@web40805.mail.yahoo.com> Message-ID: On Thu, 8 Jul 2004, vijay shrestha wrote: > i am a newbie in java commmunication api programming, > i have installed rxtx and java comm api from sun for > solaris on my fedora core system. i am trying to make > my computer dial to a phone line, can you help me how > to do that. > > can you give some code snippets to make sure that my > rxtx is taking modem. i have modem ame-tt series(acer > external 56 modem). > SimpleRead.java and SimpleSnuV1.java have been used in the past to communicate with a GSM cell phone. I see the SimpleRead.java has the dial code. These can be found in the contrib directory that comes with the rxtx source code. That should be fairly close to what you are interested in. It is the only example code we have at the moment that is like what you are interested in. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 8 06:46:13 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 8 Jul 2004 21:46:13 +0900 Subject: [Rxtx] Printer Codes Message-ID: Hello, Anybody knows how to print bold characters or where can i get in the net? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040708/ec6a453e/attachment-0024.html From taj at www.linux.org.uk Thu Jul 8 06:58:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 8 Jul 2004 13:58:33 +0100 (BST) Subject: [Rxtx] Printer Codes In-Reply-To: References: Message-ID: On Thu, 8 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Anybody knows how to print bold characters or where can i get in the net? > You probably want to look at something like post script. You can always 'Print to File' with your favorite software and take a look. Just a simple back space to strike twice may work too. Oct Dec Hex Char Oct Dec Hex Char ------------------------------------------------------------ 000 0 00 NUL '\0' 100 64 40 @ 001 1 01 SOH 101 65 41 A 002 2 02 STX 102 66 42 B 003 3 03 ETX 103 67 43 C 004 4 04 EOT 104 68 44 D 005 5 05 ENQ 105 69 45 E 006 6 06 ACK 106 70 46 F 007 7 07 BEL '\a' 107 71 47 G 010 8 08 BS '\b' 110 72 48 H --------------------------^ -- Trent Jarvi taj at www.linux.org.uk From pashmina.mukhi at patni.com Thu Jul 8 22:32:05 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Fri, 9 Jul 2004 10:02:05 +0530 Subject: [Rxtx] (no subject) Message-ID: <001601c4656d$b0bd8eb0$036ad103@patni.com> Hi, I need some help in RxTx. We are developing a modem dialer program using RxTx, to connect to some devices. After establishing a connection with the modem, we pass some commands to retrieve the data. The problem is that we are getting the data, but it is coming in some chunks/blocks. After some data, it waits for some input. So after pressing enter, the next set of data is got. Wanted to know, if this is some stream related problem or buffering issue related to the stream. Also, Trent suggested that this could be a problem with the serial port hardware buffer filling after which the data is being read. But previously we were using wvdial and faced no such problem of data coming in chunks. Please let me know if you can provide some help/solution in this issue. Thanks & Regards, Pashmina. From moritz.gmelin at gmx.de Fri Jul 9 04:21:49 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 12:21:49 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA Message-ID: Hi Members, I have an application that is sending data thorugh some COM: Port that is Connected to a USB-IrDA Dongle. Problem with Windows is, that the WRITE() command in SerialImp.c's writeArray Method blocks until the data is sent. Is there some way to set a timeout to that blocking ? Since I cannot kill that blocking thread in Java what other ways do I have to interrupt that Method or can I check prior to sending the data wether a receiver is available ? Thanks Moritz From tomaz.hutter at TIPRO.SI Fri Jul 9 00:06:44 2004 From: tomaz.hutter at TIPRO.SI (Tomaz Hutter) Date: Fri, 9 Jul 2004 08:06:44 +0200 Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 Message-ID: Hello, I was checking this and also other forums for an answer to my question, but I haven't found one. So I am posting it here. As we know: On Suse Linux 9.0 (and also 8.2) the following error happens: RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 As I understand it is because Suse is not observing the file system hierarchy standard (http://www.pathname.com/fhs/). Suse uses different paths. My question is: Is there any elegant solution to this problem? Thank you and kind regards, Tomaz From taj at www.linux.org.uk Fri Jul 9 06:05:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:05:16 +0100 (BST) Subject: [Rxtx] Unexpected lock file: /var/spool/locks/LCK..ttyS0 in Suse 9.0 In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Tomaz Hutter wrote: > Hello, > > I was checking this and also other forums for an answer to my question, > but I haven't found one. So I am posting it here. > > As we know: > On Suse Linux 9.0 (and also 8.2) the following error happens: > RXTX Error: Unexpected lock file: /var/spool/locks/LCK..ttyS0 > As I understand it is because Suse is not observing the file system > hierarchy standard (http://www.pathname.com/fhs/). Suse uses different > paths. > > My question is: > Is there any elegant solution to this problem? > > Thank you and kind regards, > Tomaz Hi Tomaz Suse's solution is a hack to allow software that violates the standard run on Linux with minimal change. They created a symbolic link to the proper location so the locks are not actually in /var/spool/locks. So now the lock files appear in two locations. /var/lock and /var/spool/locks. RXTX also knows there are some old code bases floating around that may not use the FHS standard, so rxtx also checks around for problem software. This is where the problem comes in. So the solution may be to just delete the symbolic link and force all software to use the standard. That would be the easiest. If thats not acceptable you can delete the /var/spool/locks directory in the directories check in SerialImp.c. The best solution would be to determine if /var/spool/locks is a symbolic link to the intended directory on the platform rxtx is currently running on and then have rxtx ignore it. Nobody has coded a solution like this yet. As it turns out.. The lock is usually from a previous copy of rxtx that was not shut down properly. RXTX creates the file in the proper location but now also sees it in the symlink location. So the lockfile has a PID in it of a process thats no longer around. So a quicker solution, though not as complete, would be to just chedk if the PID is valid before complaining. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jul 9 06:54:11 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 13:54:11 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi Members, > > I have an application that is sending data thorugh some COM: Port that > is Connected to a USB-IrDA Dongle. > Problem with Windows is, that the WRITE() command in SerialImp.c's > writeArray Method blocks until the data is sent. > Is there some way to set a timeout to that blocking ? Since I cannot > kill that blocking thread in Java what other ways do I have to > interrupt that Method or can I check prior to sending the data wether a > receiver is available ? > > Thanks > Hi Moritz The rxtx code tries to open with O_NOBLOCK do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); Performing the O_NOBLOCK allows WRITE() to return if the write would block. So the SerialImp.c layer appears to be as correct as possible in this sense. After that, we are left with the implementation thats pur w32 API code. What we do in the termios.c file may not match these expectations. You are probably looking at this code in SerialImp.c and assuming that its just looping there: do { result=WRITE (fd, (void * ) ((char *) body + total + offset), count - total); /* dima */ if(result >0){ total += result; } report("writeArray()\n"); } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); I dont think this is the case. I dont think the write has even returned. The w32 kernel may well not be able to know if the write would block. Think about it.. how would it know for sure? Its hard to know what the cause is for sure without testing a little. What you may try doing is just creating a small C file that opens the port and writes to it. Just use the w32 API and keep it simple. If you get an example that works (does not block on write) we can see how termios.c differs and make the changes. Beyond that, rxtx uses overlapping writes. This means that write does return right away and the status of the write can be checked. See termios.c:serial_write. The serial_write does loop there until ERROR_IO_PENDING is no longer a returned on GetLastError. It does check for incomplete writes and errors. You may want to examine the code there. A timeout could certainly be added there. termios.c is not anything special. It tries to behave mostly POSIX like but its w32 native c. You can compile it as a mingw native library or you can even put a main() in there and just test it as a stand alone application. --- termios.c file --- termios.c code ... int main( char *args[] ) { int fd = serial_open("COM1", O_NONBLOCK ); serial_write( fd, "asdf", 4 ); serial_close( fd ); exit(0); } --- end of file --- using mingw32 (http://www.mingw.org/) gcc -g -I. -o testname.exe I suspect that will be the easist way to start looking at isolating/reproducing the problem and making changes that could solve the behavior problem. The good part is you can probably assume this is not in the Java, and not in SerialImp.c if reproducable above. I dont think a write timeout extension to commapi should be needed. Its certainly an extension that could be added in rxtx 2.1 if there was need. I think we can simply get past your problem by making sure that write errors if it would block. #define EAGAIN 11 /* Try again */ EAGAIN Non-blocking I/O has been selected using O_NONBLOCK and the write would block. (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) -- Trent Jarvi taj at www.linux.org.uk From ogi at ogi.cl Fri Jul 9 07:54:09 2004 From: ogi at ogi.cl (Olgierd Eysymontt) Date: Fri, 09 Jul 2004 09:54:09 -0400 Subject: [Rxtx] Timeout accuracy Message-ID: <1089381249.3033.15.camel@newton> Hi, I'm using RXTX for communicating dataloggers in a 422 network and I need to detect the end of a packet by a timeout. Seeing the waveforms on a scope I see the computer takes some time to detect the timeout (I have defined the value to 3 ms and computer takes between 50 ms and 100 ms to detect the timeout), my question is if there is a way to make this time lower as I have the bus only 25% aprox. used in time. I've searched the mailing list archives without luck. My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is titan pci-200L-si. Thank you very much to you all, RXTX has made my life much easier as I were before programming the same routines in C before to know about RXTX. Olgierd Eysymontt From taj at www.linux.org.uk Fri Jul 9 08:09:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 15:09:10 +0100 (BST) Subject: [Rxtx] Timeout accuracy In-Reply-To: <1089381249.3033.15.camel@newton> References: <1089381249.3033.15.camel@newton> Message-ID: On Fri, 9 Jul 2004, Olgierd Eysymontt wrote: > Hi, > I'm using RXTX for communicating dataloggers in a 422 network > and I > need to detect the end of a packet by a timeout. > > Seeing the waveforms on a scope I see the computer takes some > time to > detect the timeout (I have defined the value to 3 ms and computer takes > between 50 ms and 100 ms to detect the timeout), my question is if there > is a way to make this time lower as I have the bus only 25% aprox. used > in time. > > I've searched the mailing list archives without luck. > > My system is a Fedora Core 1, j2sdk1.4.2_03, serial board is > titan > pci-200L-si. > > Thank you very much to you all, RXTX has made my life much > easier as I > were before programming the same routines in C before to know about > RXTX. > > Olgierd Eysymontt > > for 422, rxtx (java serial comm in general) is going to be a bit sluggish. But I'd expect something less than 50 ms. maybe closer to 20 ms. The obvious thing to check is the usleeps in SerialImp.c. Some of rxtx functionality is poll like on boards with incomplete kernel support. The usleeps keep the CPU use down at the expense of latency. The second thing to look at would be a realtime linux kernel. This will help but the 100 ms you mention suggests we are in another degree of latency. Maybe it will help. But check the usleeps first. The last thing I can suggest is that crossing the JNI is expensive for you. So the more you can do in a single call accross the JNI in time sensitive areas, the better. You may want to move some of the native code around to do more specifically what you are after. I have only done one test with time. loop() { -data available event- read(); write(); } This was all from Java. When I tried this with an uncalibrated scope, it appeared to be ~20 ms between bytes going out. This was back in jdk 1.3 though/linux 2.4 though. w32 was a little (10%) better which was really odd because it was in vmware on linux. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Fri Jul 9 09:15:41 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Fri, 9 Jul 2004 17:15:41 +0200 Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: Hi, I know too little Windows Programming as to decide whether this is correct. in termios.c I Set the last parameter of GetOverlappedResult in serial_write to FALSE (not waiting) and added a counter in that while loop. with a Sleep (50) at the end. After 100 Interations I go into that error-handling if statement and return. Can this break something else ? M. Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > >> Hi Members, >> >> I have an application that is sending data thorugh some COM: Port that >> is Connected to a USB-IrDA Dongle. >> Problem with Windows is, that the WRITE() command in SerialImp.c's >> writeArray Method blocks until the data is sent. >> Is there some way to set a timeout to that blocking ? Since I cannot >> kill that blocking thread in Java what other ways do I have to >> interrupt that Method or can I check prior to sending the data wether >> a >> receiver is available ? >> >> Thanks >> > > Hi Moritz > > The rxtx code tries to open with O_NOBLOCK > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > block. So the SerialImp.c layer appears to be as correct as possible > in > this sense. After that, we are left with the implementation thats pur > w32 API code. What we do in the termios.c file may not match these > expectations. > > You are probably looking at this code in SerialImp.c and assuming that > its > just looping there: > > do { > result=WRITE (fd, (void * ) ((char *) body + total + > offset), count - total); /* dima */ > if(result >0){ > total += result; > } > report("writeArray()\n"); > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > ); > > I dont think this is the case. I dont think the write has even > returned. > > > The w32 kernel may well not be able to know if the write would block. > Think about it.. how would it know for sure? Its hard to know what the > cause is for sure without testing a little. > > What you may try doing is just creating a small C file that opens the > port > and writes to it. Just use the w32 API and keep it simple. If you > get an > example that works (does not block on write) we can see how termios.c > differs and make the changes. > > Beyond that, rxtx uses overlapping writes. This means that write does > return right away and the status of the write can be checked. See > termios.c:serial_write. The serial_write does loop there until > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > check > for incomplete writes and errors. You may want to examine the code > there. > A timeout could certainly be added there. > > termios.c is not anything special. It tries to behave mostly POSIX > like > but its w32 native c. You can compile it as a mingw native library or > you > can even put a main() in there and just test it as a stand alone > application. > > --- termios.c file --- > > termios.c code > > ... > > int main( char *args[] ) > { > int fd = serial_open("COM1", O_NONBLOCK ); > serial_write( fd, "asdf", 4 ); > serial_close( fd ); > exit(0); > } > > --- end of file --- > > using mingw32 (http://www.mingw.org/) > gcc -g -I. -o testname.exe > > > I suspect that will be the easist way to start looking at > isolating/reproducing the problem and making changes that could solve > the > behavior problem. The good part is you can probably assume this is > not in > the Java, and not in SerialImp.c if reproducable above. > > I dont think a write timeout extension to commapi should be needed. > Its > certainly an extension that could be added in rxtx 2.1 if there was > need. > > I think we can simply get past your problem by making sure that write > errors if it would block. > > #define EAGAIN 11 /* Try again */ > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > and > the write would block. > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > -- > 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 Fri Jul 9 13:10:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jul 2004 20:10:52 +0100 (BST) Subject: [Rxtx] Windows Blocking Write on IrDA In-Reply-To: References: Message-ID: On Fri, 9 Jul 2004, Moritz Gmelin wrote: > Hi, > > I know too little Windows Programming as to decide whether this is > correct. > > in termios.c > > I Set the last parameter of GetOverlappedResult in serial_write to > FALSE (not waiting) and added a counter in that while loop. with a > Sleep (50) at the end. > After 100 Interations I go into that error-handling if statement and > return. > > Can this break something else ? > I think that will be fine. If you look at serial_read() which has to deal with timeouts, we use some code with GetTicCount(). Wayne Roberts wrote that code and was able to verify that it did what he needed. I dont know that we want to put this in the main release but it could be a compile option. I'm worried about corner cases like writing a 40k write at 5 baud rate terminating early. If you have a patch thats working for you, please do post it to the list so others can find it on the archive. > M. > > Am 09.07.2004 um 14:54 schrieb Trent Jarvi: > > > On Fri, 9 Jul 2004, Moritz Gmelin wrote: > > > >> Hi Members, > >> > >> I have an application that is sending data thorugh some COM: Port that > >> is Connected to a USB-IrDA Dongle. > >> Problem with Windows is, that the WRITE() command in SerialImp.c's > >> writeArray Method blocks until the data is sent. > >> Is there some way to set a timeout to that blocking ? Since I cannot > >> kill that blocking thread in Java what other ways do I have to > >> interrupt that Method or can I check prior to sending the data wether > >> a > >> receiver is available ? > >> > >> Thanks > >> > > > > Hi Moritz > > > > The rxtx code tries to open with O_NOBLOCK > > > > do { > > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > > } while (fd < 0 && errno==EINTR); > > > > > > Performing the O_NOBLOCK allows WRITE() to return if the write would > > block. So the SerialImp.c layer appears to be as correct as possible > > in > > this sense. After that, we are left with the implementation thats pur > > w32 API code. What we do in the termios.c file may not match these > > expectations. > > > > You are probably looking at this code in SerialImp.c and assuming that > > its > > just looping there: > > > > do { > > result=WRITE (fd, (void * ) ((char *) body + total + > > offset), count - total); /* dima */ > > if(result >0){ > > total += result; > > } > > report("writeArray()\n"); > > } while ( ( total < count ) && (result < 0 && errno==EINTR ) > > ); > > > > I dont think this is the case. I dont think the write has even > > returned. > > > > > > The w32 kernel may well not be able to know if the write would block. > > Think about it.. how would it know for sure? Its hard to know what the > > cause is for sure without testing a little. > > > > What you may try doing is just creating a small C file that opens the > > port > > and writes to it. Just use the w32 API and keep it simple. If you > > get an > > example that works (does not block on write) we can see how termios.c > > differs and make the changes. > > > > Beyond that, rxtx uses overlapping writes. This means that write does > > return right away and the status of the write can be checked. See > > termios.c:serial_write. The serial_write does loop there until > > ERROR_IO_PENDING is no longer a returned on GetLastError. It does > > check > > for incomplete writes and errors. You may want to examine the code > > there. > > A timeout could certainly be added there. > > > > termios.c is not anything special. It tries to behave mostly POSIX > > like > > but its w32 native c. You can compile it as a mingw native library or > > you > > can even put a main() in there and just test it as a stand alone > > application. > > > > --- termios.c file --- > > > > termios.c code > > > > ... > > > > int main( char *args[] ) > > { > > int fd = serial_open("COM1", O_NONBLOCK ); > > serial_write( fd, "asdf", 4 ); > > serial_close( fd ); > > exit(0); > > } > > > > --- end of file --- > > > > using mingw32 (http://www.mingw.org/) > > gcc -g -I. -o testname.exe > > > > > > I suspect that will be the easist way to start looking at > > isolating/reproducing the problem and making changes that could solve > > the > > behavior problem. The good part is you can probably assume this is > > not in > > the Java, and not in SerialImp.c if reproducable above. > > > > I dont think a write timeout extension to commapi should be needed. > > Its > > certainly an extension that could be added in rxtx 2.1 if there was > > need. > > > > I think we can simply get past your problem by making sure that write > > errors if it would block. > > > > #define EAGAIN 11 /* Try again */ > > > > EAGAIN Non-blocking I/O has been selected using O_NONBLOCK > > and > > the write would block. > > > > (note EAGAIN is not EINTR so SerialImp.c should behave as you hope) > > > > -- > > 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 j.w.r.degoede at hhs.nl Mon Jul 12 05:42:39 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Mon, 12 Jul 2004 13:42:39 +0200 Subject: [Rxtx] rxtx and federa core 2 Message-ID: <40F2792F.30301@hhs.nl> Hi, I've had quite some troubles getting rxtx to work on fedora core 2 so I thought I should share my results. I was using j2sdk1.4.2_04, and installing the prebuilt rxtx-2.0.7pre1 binaries for linux. Problem 1 (using j2sdk1.4.2_04, and rxtx-2.0.7pre1 binaries for linux) -SIGNAL 11 (segmentation fault) when running BlackBox: -I first tried compiling from source, but that didn't help -Then I searched this mailing list and as discussed in: http://marc.theaimsgroup.com/?l=rxtx&m=108729411003443&w=2 This can be fixed by adding a few usleep() calls (ugly) -Since I found the usleeps ugly I tried compiling 2.0.5, that worked, but hit problem 2. -I've also tried the 1.4 binaries with -noverify, but that also hits problem 2. Problem 2 (using j2sdk1.4.2_04, and rxtx-2.0.5 from source) -BlackBox now starts but is very unresponsive, it takes seconds to close a port and after that it seems to just hang -I tried a lott of stuff and ended up with using the 1.5 JDK beta and the 1.4 rxtx binaries with -noverify this works! -After this I wanted to get rid of the -noverify, so I tried compiling 1.4 sources, but these won't compile on a recent system due to libtool problems -So I tried compiling 2.0.5 with the 1.5 jdk beta, this one will compile, but won't install again due to libtool problems? But I did manage to compile 2.0.5 against j2sdk1.4.2_04. So I downgraded to j2sdk1.4.2_04, compiled 2.0.5, copied the libs and .jar file. upgraded to 1.5 jdk beta installed the libs and .jar file, and it works! So a quick guide to rxtx on fedora core 2: -install j2sdk1.4.2_04 -get suns commapi and install comm.jar from this -get rxtx-2.0.5 sources, compile and install -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to some dir -remove j2sdk1.4.2_04 -install jdk 1.5 beta -copy javax.comm.properties, the rxtx .jar file and the rxtx .so files to the jdk 1.5 beta dir -enjoy blackbox and other serial apps. It would be nice if the following could be fixed: -compile of rxtx 2.x.x for jdk 1.5 -the breakage (SIG11) between 2.0.5 and 2.0.7pre1 Regards, Hans From moritz.gmelin at gmx.de Mon Jul 12 08:55:37 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Mon, 12 Jul 2004 16:55:37 +0200 Subject: [Rxtx] Port-Enumeration fails Message-ID: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Hi, I have a problem on Windows, with CommPortIdentifier.getPortIdentifiers(); As soon as I approach a generic IrDA device to my USB-IrDA Dongle (configured to be COM4) the call to getPortIdentifiers does not return anymore. It just hangs and cannot event be killed. If I disconnect the dongle or turn the IrDA-Device off, it will return after a while. It does not happen with all IrDA devices (with my Palm, I don't have that problem). Also, it does only happen in Windows. ?????? Moritz From taj at www.linux.org.uk Mon Jul 12 15:56:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 12 Jul 2004 22:56:53 +0100 (BST) Subject: [Rxtx] Port-Enumeration fails In-Reply-To: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: On Mon, 12 Jul 2004, Moritz Gmelin wrote: > Hi, > > I have a problem on Windows, with > CommPortIdentifier.getPortIdentifiers(); > > As soon as I approach a generic IrDA device to my USB-IrDA Dongle > (configured to be COM4) the call to getPortIdentifiers does not return > anymore. > It just hangs and cannot event be killed. If I disconnect the dongle or > turn the IrDA-Device off, it will return after a while. > It does not happen with all IrDA devices (with my Palm, I don't have > that problem). > Also, it does only happen in Windows. > > ?????? > > It sounds like w32, IrDA reads and writes are not timing out. This probably has something to do with the nature of the connections and the driver underneath. With rxtx, enumerating the ports involves opening the port and trying a timed out read. It sounds like this is not timing out in the situation you describe. I dont have a generic solution for this off had. It is possible to just have the testRead() code in SerialImp.c try to open and close the port but not read. It is possible to use specified ports. I suspect that this is going to have more problems than enumeration. Someone with the hardware is going to need to examine the issue in more detail. I'm really curious why that read does not timeout though. It would be interesting to look at the w32 api structure with and without the IrDA setup you mention. -- Trent Jarvi taj at www.linux.org.uk From moritz.gmelin at gmx.de Tue Jul 13 05:37:45 2004 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 13 Jul 2004 13:37:45 +0200 Subject: [Rxtx] Port-Enumeration fails In-Reply-To: References: <88DAAAFF-D413-11D8-AF54-000A95BC7E8A@gmx.de> Message-ID: <0EE458A2-D4C1-11D8-AF54-000A95BC7E8A@gmx.de> That sounds reasonable, it matches the other problem that I had mentioned before, where the writeArray does not return.... M. Am 12.07.2004 um 23:56 schrieb Trent Jarvi: > On Mon, 12 Jul 2004, Moritz Gmelin wrote: > >> Hi, >> >> I have a problem on Windows, with >> CommPortIdentifier.getPortIdentifiers(); >> >> As soon as I approach a generic IrDA device to my USB-IrDA Dongle >> (configured to be COM4) the call to getPortIdentifiers does not return >> anymore. >> It just hangs and cannot event be killed. If I disconnect the dongle >> or >> turn the IrDA-Device off, it will return after a while. >> It does not happen with all IrDA devices (with my Palm, I don't have >> that problem). >> Also, it does only happen in Windows. >> >> ?????? >> >> > > It sounds like w32, IrDA reads and writes are not timing out. This > probably has something to do with the nature of the connections and the > driver underneath. With rxtx, enumerating the ports involves opening > the > port and trying a timed out read. It sounds like this is not timing > out > in the situation you describe. > > I dont have a generic solution for this off had. It is possible to > just > have the testRead() code in SerialImp.c try to open and close the port > but > not read. It is possible to use specified ports. I suspect that this > is > going to have more problems than enumeration. Someone with the > hardware > is going to need to examine the issue in more detail. > > I'm really curious why that read does not timeout though. It would be > interesting to look at the w32 api structure with and without the IrDA > setup you mention. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From renaud at nentec.de Thu Jul 15 11:38:52 2004 From: renaud at nentec.de (Fabien Renaud) Date: Thu, 15 Jul 2004 19:38:52 +0200 Subject: [Rxtx] Rxtx with kaffe Message-ID: <40F6C12C.3020400@nentec.de> Hi, I?m trying to run SimpleWrite with kaffe (I already succeeded with SableVM). My problem is nothing happens and I have no messages The problem comes from this line in RXTXPort.java : fd = open( name ); Name value is /dev/ttyS3 Cheers, Fabien From renaud at nentec.de Fri Jul 16 03:30:51 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 11:30:51 +0200 Subject: [Rxtx] Rxtx with kaffe In-Reply-To: <40F6C12C.3020400@nentec.de> References: <40F6C12C.3020400@nentec.de> Message-ID: <40F7A04B.4010503@nentec.de> Fabien Renaud wrote: > Hi, > > I?m trying to run SimpleWrite with kaffe (I already succeeded with > SableVM). > My problem is nothing happens and I have no messages > The problem comes from this line in RXTXPort.java : > > fd = open( name ); > > Name value is /dev/ttyS3 > > > Cheers, > Fabien It seems the native function open (in SerialImp.c) never runs (I put a breakpoint on it and it?s never reached). There is no fficall after fd = open( name ); Maybe a problem from libffi ? Cheers, Fabien From robilad at kaffe.org Fri Jul 16 04:25:36 2004 From: robilad at kaffe.org (Dalibor Topic) Date: Fri, 16 Jul 2004 12:25:36 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7A04B.4010503@nentec.de> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> Message-ID: <40F7AD20.20409@kaffe.org> Fabien Renaud wrote: > Fabien Renaud wrote: > >> Hi, >> >> I?m trying to run SimpleWrite with kaffe (I already succeeded with >> SableVM). >> My problem is nothing happens and I have no messages >> The problem comes from this line in RXTXPort.java : >> >> fd = open( name ); >> >> Name value is /dev/ttyS3 >> >> >> Cheers, >> Fabien > > > It seems the native function open (in SerialImp.c) never runs (I put a > breakpoint on it and it?s never reached). > There is no fficall after fd = open( name ); > Maybe a problem from libffi ? Are you using libffi or are you using kaffe's sysdepCallMethod? :) If you are running it using jit, you can use -verbosejit to print out the invoked methods. cheers, dalibor topic From renaud at nentec.de Fri Jul 16 04:31:07 2004 From: renaud at nentec.de (Fabien Renaud) Date: Fri, 16 Jul 2004 12:31:07 +0200 Subject: [kaffe] Re: [Rxtx] Rxtx with kaffe In-Reply-To: <40F7AD20.20409@kaffe.org> References: <40F6C12C.3020400@nentec.de> <40F7A04B.4010503@nentec.de> <40F7AD20.20409@kaffe.org> Message-ID: <40F7AE6B.6030903@nentec.de> Dalibor Topic wrote: > Fabien Renaud wrote: > >> Fabien Renaud wrote: >> >>> Hi, >>> >>> I?m trying to run SimpleWrite with kaffe (I already succeeded with >>> SableVM). >>> My problem is nothing happens and I have no messages >>> The problem comes from this line in RXTXPort.java : >>> >>> fd = open( name ); >>> >>> Name value is /dev/ttyS3 >>> >>> >>> Cheers, >>> Fabien >> >> >> >> It seems the native function open (in SerialImp.c) never runs (I put >> a breakpoint on it and it?s never reached). >> There is no fficall after fd = open( name ); >> Maybe a problem from libffi ? > > > Are you using libffi or are you using kaffe's sysdepCallMethod? :) > > If you are running it using jit, you can use -verbosejit to print out > the invoked methods. > > cheers, > dalibor topic Ok I found the problem :) I added static and that works (well there is more code executed). It?s maybe due to the name open ( That sould be better with Open) From dcowl at elcos.com Wed Jul 14 17:24:25 2004 From: dcowl at elcos.com (Dave Cowl) Date: Wed, 14 Jul 2004 16:24:25 -0700 Subject: [Rxtx] Odd behaviour under OSX and Linux Message-ID: <1089847465.26903.58.camel@ren.elcos2> Hello, I am new to RXTX and have tried to implement under OSX. So far I am making progress, but I have got to the point where I am trying to open one of the ports listed and I get a PortInUseException: Unknown Application. This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 What is he difference between these to anyways? RXTX 2.1-7 beta using the gnu.io.* So I tried to mimic my situation on my Gentoo linux box with blackdown-jdk-1.4.1 and I get a more unusual error: java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver --- If anyone can offer any thoughts on these issues, please do. I am not sure how to subscribe to this list, so please Cc: me in replies. Thanks! DAve Cowl. eLCOS Microdisplay From robshep at informatics.bangor.ac.uk Fri Jul 16 05:10:15 2004 From: robshep at informatics.bangor.ac.uk (Rob Shepherd) Date: Fri, 16 Jul 2004 12:10:15 +0100 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native Message-ID: <40F7B797.2050205@informatics.bangor.ac.uk> On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. For your interest I got this same error. recompiling worked for me $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) kernel 2.6.7 on slackware 9.1 rxtx-2.0.7-pre1 compiled from source keep up the good work. Rob (unsubscribed) -- /** * Rob Shepherd, * University Of Wales, Bangor, * School of Informatics, * Dean Street, * Bangor, * Gwynedd, UK /\ /\ * LL57 1UT / \/ \ /\ * --------------/---/ \--\---- * * robshep [at] informatics [d0t] bangor [dOt] ac [D0T] uk * * +44 (0) 1248 38 27 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3230 bytes Desc: S/MIME Cryptographic Signature Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20040716/c32bd4c0/smime-0024.bin From dmarkman at mac.com Fri Jul 16 12:16:22 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 16 Jul 2004 14:16:22 -0400 Subject: [Rxtx] Odd behaviour under OSX and Linux In-Reply-To: <1089847465.26903.58.camel@ren.elcos2> References: <1089847465.26903.58.camel@ren.elcos2> Message-ID: <3E08172B-D754-11D8-A4C2-000A95DA5E9C@mac.com> what do you mean by " have tried to implement under OSX" it's already implemented and specifically 2.1.7 package has a working mac os x installer if it doesn't work let us know On Jul 14, 2004, at 7:24 PM, Dave Cowl wrote: > > Hello, > > I am new to RXTX and have tried to implement under OSX. > > So far I am making progress, but I have got to the point where I am > trying to open one of the ports listed and I get a PortInUseException: > Unknown Application. > > This happens whether I use /dev/tty.usbserial0 or /dev/cu.usbserial0 > What is he difference between these to anyways? > > RXTX 2.1-7 beta using the gnu.io.* > > So I tried to mimic my situation on my Gentoo linux box with > blackdown-jdk-1.4.1 and I get a more unusual error: > > java.lang.ClassCastException thrown while loading gnu.io.RXTXCommDriver > > --- > > If anyone can offer any thoughts on these issues, please do. I am not > sure how to subscribe to this list, so please Cc: me in replies. > > Thanks! > > DAve Cowl. eLCOS Microdisplay > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From j.w.r.degoede at hhs.nl Fri Jul 16 23:17:15 2004 From: j.w.r.degoede at hhs.nl (Hans de Goede) Date: Sat, 17 Jul 2004 07:17:15 +0200 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native In-Reply-To: <40F7B797.2050205@informatics.bangor.ac.uk> References: <40F7B797.2050205@informatics.bangor.ac.uk> Message-ID: <40F8B65B.9070805@hhs.nl> See my earlier posting about getting rxtx to work with FC2. Regards, Hans Rob Shepherd wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > > > An unexpected exception has been detected in native code outside > the VM. > > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > > Function=_dl_relocate_object+0x6A > > > > Library=/lib/ld-linux.so.2 > > > > > > > > Current Java thread: > > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > > > > I would suggest trying to download the source and compiling it on your > > > system. We had another report like this on a Mandrake 10(?). > Thats not > > > where I'd expect code problems to blow up. recompiling did help on > the > > > Mandrake system. > > For your interest > > I got this same error. > recompiling worked for me > > $ java -version > java version "1.4.2_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) > Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) > > kernel 2.6.7 on slackware 9.1 > > rxtx-2.0.7-pre1 compiled from source > > keep up the good work. > > Rob (unsubscribed) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -- EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From fpotter at u.washington.edu Sun Jul 18 15:07:27 2004 From: fpotter at u.washington.edu (Fred Potter) Date: Sun, 18 Jul 2004 14:07:27 -0700 (PDT) Subject: [Rxtx] Status of WinCE Port Message-ID: I am trying to find out what the current status of the WinCE port is. Did the CE port ever make the switch to the gnu.io package? Is CE current with rxtx 2.1? Any information would be greatly appreciated. I've been trying to get it up and running on PocketPC 2003 but no luck so far - I want make sure I am going in the right direction. Thanks, Fred Potter fpotter at u.washington.edu From s0343497 at sms.ed.ac.uk Tue Jul 20 05:16:05 2004 From: s0343497 at sms.ed.ac.uk (Q Ma) Date: Tue, 20 Jul 2004 12:16:05 +0100 Subject: [Rxtx] Problem of RXTX 2.1 in IRIX:cannot map soname librxtxSerial.so Message-ID: <1090322165.40fcfef566cfc@sms.ed.ac.uk> Hi, there I want to use RXTX in IRIX for my java program to read stream from COM1/2. I download the package: rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz, which contain RXTXcomm.jar file and five share library .so file. and set up all variants: CLASSPATH, LD_LIBRARY_PATH, and even -Djava.library.path option. There is no problem for javac compile now. However, when I run the program, there is error: java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/people/qi/rxtx/librxtxSerial.so: 260309:java: rld: Fatal Error: Cannot Successfully map soname '/usr/people/qi/rxtx/librxtxSerial.so' under any of the filenames /usr/people/qi/rxtx/librxtxSerial.so at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1469) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at Controllor.(Controllor.java:91) at Controllor.main(Controllor.java:320) The JDK I use is 1.4. I don't know what the problem is, can anyone give some ideas? Thank you very much. Best Regards Richard From pashmina.mukhi at patni.com Tue Jul 20 06:04:42 2004 From: pashmina.mukhi at patni.com (Pashmina Mukhi) Date: Tue, 20 Jul 2004 17:34:42 +0530 Subject: [Rxtx] Help to start PPP daemon (from linux) through Java Message-ID: <000101c46e51$be667ad0$036ad103@patni.com> Hi, Our application requirement is to start PPP daemon (from linux) through java code, using Runtime.exec() (or any other method) and fire an HTTP URL to some devices (called controllers) and get the required data. We are facing a ?java.net.ConnectException: Connection timed out?, while executing the program. This error is coming at the line where we are getting an input stream from the URL Connection. I Want to know the exact mechanism of starting ppp daemon (parameters to form the string). I am using Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. There is no problem connecting to the controller, via the modems, since previously we were using wvdial to dial to the controllers and retrieve the data. Presently have to do the same through Java code. Any help will be appreciated! Thanks & Regards, Pashmina Mukhi Software Engineer From taj at www.linux.org.uk Thu Jul 22 17:54:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 23 Jul 2004 00:54:52 +0100 (BST) Subject: [Rxtx] Help to start PPP daemon (from linux) through Java In-Reply-To: <000101c46e51$be667ad0$036ad103@patni.com> References: <000101c46e51$be667ad0$036ad103@patni.com> Message-ID: On Tue, 20 Jul 2004, Pashmina Mukhi wrote: > Hi, > > Our application requirement is to start PPP daemon (from linux) through java > code, using Runtime.exec() (or any other method) and fire an HTTP URL to > some devices (called controllers) and get the required data. > We are facing a ?java.net.ConnectException: Connection timed out?, while > executing the program. This error is coming at the line where we are getting > an input stream from the URL Connection. > > I Want to know the exact mechanism of starting ppp daemon (parameters to > form the string). I am using > Process p = r.exec("/usr/sbin/pppd " +portName + " 57600"); > Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access. > > There is no problem connecting to the controller, via the modems, since > previously we were using wvdial to dial to the controllers and retrieve the > data. Presently have to do the same through Java code. > RXTX/CommAPI is like the C API that pppd is writen to but for Java. A pppd like client could be written that uses rxtx but the use of exec(pppd) is not related to rxtx. Perhaps the problem can even be reproduced without Java. A more general Java news group would probably be able to provide help. -- Trent Jarvi taj at www.linux.org.uk From kirk at kirk.homeip.net Mon Jul 26 09:57:57 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 10:57:57 -0500 Subject: [Rxtx] JVM won't load DLL? Message-ID: <005b01c47329$549830d0$1800000a@jged.com> Hello, I am new to using java libraries. I currently have been successfully been able to use javax.comm library, but the quirks under Windows 98 are killing my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, and I have changed my source files and my JBuilder X (borland) project configuration to use RXTX instead of javax. The code compiles great, and the application operates normally up until I execute the code that utilizes the RXTX library. I get an error code from the dynamic class library loading code saying it cannot find the class's implementation (the code for CommPortIdentifier). This is the actual error: java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at com.application.data.DataDownload.Download(DataDownload.java:373) at com.application.app.CommProgram.run(CommProgram.java:1055) at java.lang.Thread.run(Thread.java:534) Can someone please explain how to completely install this package? From kirk at kirk.homeip.net Mon Jul 26 10:06:43 2004 From: kirk at kirk.homeip.net (Kirk A Wolff) Date: Mon, 26 Jul 2004 11:06:43 -0500 Subject: [Rxtx] JVM won't load DLL? References: <005b01c47329$549830d0$1800000a@jged.com> Message-ID: <006101c4732a$8c0e61f0$1800000a@jged.com> Nevermind, I found that even though I thought it was, the jar wasn't really in the classpath. Thanks anyway. - Kirk ----- Original Message ----- From: "Kirk A Wolff" To: Sent: Monday, July 26, 2004 10:57 AM Subject: [Rxtx] JVM won't load DLL? > Hello, > > I am new to using java libraries. I currently have been successfully been > able to use javax.comm library, but the quirks under Windows 98 are killing > my rs232 firmware communication handshaking. I want to switch to rxtx 2.1, > and I have changed my source files and my JBuilder X (borland) project > configuration to use RXTX instead of javax. The code compiles great, and > the application operates normally up until I execute the code that utilizes > the RXTX library. I get an error code from the dynamic class library > loading code saying it cannot find the class's implementation (the code for > CommPortIdentifier). This is the actual error: > java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier > at com.application.data.DataDownload.Download(DataDownload.java:373) > at com.application.app.CommProgram.run(CommProgram.java:1055) > at java.lang.Thread.run(Thread.java:534) > > Can someone please explain how to completely install this package? > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_edson at yahoo.com Tue Jul 27 09:39:40 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 27 Jul 2004 08:39:40 -0700 (PDT) Subject: [Rxtx] AMD64 Message-ID: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Has there been any success on AMD64 machines? It compiles and loads fine for me, but returns an empty list for valid ports on machines that have serial ports. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From J_Arpon at alliance.com.ph Wed Jul 28 20:51:09 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 29 Jul 2004 11:51:09 +0900 Subject: [Rxtx] ttyS2 Message-ID: Hello, I tried to use /dev/ttyS2 port but having problem. So I tried checking the possible ports to be used by using this code. import gnu.io.*; import java.util.Enumeration; public class Test { public static void main(String[] arg) { System.out.println("start"); Enumeration e = CommPortIdentifier.getPortIdentifiers(); while(e.hasMoreElements()) { System.out.println(((CommPortIdentifier)e.nextElement()).getName()); } System.out.println("stop"); } } output: start /dev/ttyS0 /dev/lp0 stop Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on Linux ... What do i do? Do i have to initialize this serial port? Thanks, ============================================ Jude Tadeo A. Arpon ジュド タデオ A。 アルポン ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040729/540497ab/attachment-0024.html From taj at www.linux.org.uk Thu Jul 29 13:44:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:44:04 +0100 (BST) Subject: [Rxtx] AMD64 In-Reply-To: <20040727153940.95184.qmail@web12705.mail.yahoo.com> References: <20040727153940.95184.qmail@web12705.mail.yahoo.com> Message-ID: On Tue, 27 Jul 2004, Patrick Edson wrote: > Has there been any success on AMD64 machines? It > compiles and loads fine for me, but returns an empty > list for valid ports on machines that have serial ports. > > > The AMD64 should work fine. I'm guessing this is Linux. In that case you will want to read the INSTALL file regarding how to use lockfiles. If lockfiles are not enabled for the user, they will not be able to use any ports so a empty list will be returned. Just trying as root should bypass the problem as a test. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Thu Jul 29 13:56:25 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 29 Jul 2004 20:56:25 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Thu Jul 29 19:35:46 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Fri, 30 Jul 2004 10:35:46 +0900 Subject: [Rxtx] ttyS2 Message-ID: Thanks for that useful info. I have run this command: $ dmesg |grep tty the response was ... ttyS0 at 0x03f8 (irq = 4) is a 16550A ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! ttyS1: LSR safety check engaged! ttyS2: LSR safety check engaged! Is there anything wrong about the machine? That the kernel cant recognize the port. But what concerns me is that i tried installing this with Windows and COM3 was working fine. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Outsourcing and Software Development Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 (local 107) Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/07/30 04:56 AM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] ttyS2 On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried to use /dev/ttyS2 port but having problem. So I tried checking the > possible ports to be used by using this code. > > import gnu.io.*; > import java.util.Enumeration; > > public class Test { > public static void main(String[] arg) { > System.out.println("start"); > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > while(e.hasMoreElements()) { > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > } > System.out.println("stop"); > } > } > > output: > > start > /dev/ttyS0 > /dev/lp0 > stop > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > Linux ... What do i do? Do i have to initialize this serial port? > > Thanks, > > ============================================ > Jude Tadeo A. Arpon > ????????????????A???????????? With Linux /dev/ttyS2 would be COM3. You may want to make sure that the kernel has recognized the port: $ dmesg |grep tty ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). There should not be anything special required to configure the port once the kernel has recognized it. The enumeration just opens the port and performs a timed out read. So I'm guessing rxtx could not open the port because the kernel has yet to recognize a port there. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040730/f555a08c/attachment-0024.html From taj at www.linux.org.uk Thu Jul 29 19:56:13 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jul 2004 02:56:13 +0100 (BST) Subject: [Rxtx] ttyS2 In-Reply-To: References: Message-ID: Perhaps this is not a generic UART/serial card you have? ---^^^ is my addition. from Linux 2.6.7: drivers/serial/8250.c: /* * At this point, there's no way the LSR could still be 0xff; * if it is, then bail out, because there's likely no UART -----------------------------------------------------------^^^^^^ * here. */ if (!(up->port.flags & UPF_BUGGY_UART) && (serial_inp(up, UART_LSR) == 0xff)) { printk("ttyS%d: LSR safety check engaged!\n", up->port.line); return -ENODEV; } On Fri, 30 Jul 2004 J_Arpon at alliance.com.ph wrote: > Thanks for that useful info. > > I have run this command: > > $ dmesg |grep tty > > the response was ... > > ttyS0 at 0x03f8 (irq = 4) is a 16550A > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > ttyS1: LSR safety check engaged! > ttyS2: LSR safety check engaged! > > Is there anything wrong about the machine? That the kernel cant recognize > the port. > But what concerns me is that i tried installing this with Windows and COM3 > was working fine. > > > ============================================ > Jude Tadeo A. Arpon > ????????????????????????A?????????????????? > ============================================ > Supervising Engineer > ============================================ > Alliance Outsourcing and Software Development Inc. > e-mail: j_arpon at alliance.com.ph > Tel No. (+6332) 345-6354 (local 107) > Fax No. (+6332) 345-6433 > URL: www.alliance.com.ph > ============================================ > > "If you'll do what you've always done, you'll get what you've always > gotten" > > > > > Trent Jarvi > Sent by: rxtx-bounces at linuxgrrls.org > 2004/07/30 04:56 AM > Please respond to Java RXTX discussion > > > To: Java RXTX discussion > cc: > Subject: Re: [Rxtx] ttyS2 > > > On Thu, 29 Jul 2004 J_Arpon at alliance.com.ph wrote: > > > Hello, > > > > I tried to use /dev/ttyS2 port but having problem. So I tried checking > the > > possible ports to be used by using this code. > > > > import gnu.io.*; > > import java.util.Enumeration; > > > > public class Test { > > public static void main(String[] arg) { > > System.out.println("start"); > > Enumeration e = CommPortIdentifier.getPortIdentifiers(); > > while(e.hasMoreElements()) { > > System.out.println(((CommPortIdentifier)e.nextElement()).getName()); > > } > > System.out.println("stop"); > > } > > } > > > > output: > > > > start > > /dev/ttyS0 > > /dev/lp0 > > stop > > > > Can anyone help on how to use /dev/ttyS2 in linux? I am not familiar on > > Linux ... What do i do? Do i have to initialize this serial port? > > > > Thanks, > > > > ============================================ > > Jude Tadeo A. Arpon > > ????????????????????????????????A???????????????????????? > > With Linux /dev/ttyS2 would be COM3. You may want to make sure that the > kernel has recognized the port: > > $ dmesg |grep tty > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS1 at I/O 0x2f8 (irq = 0) is a 16550A > > This shows my laptop has COM1 and COM2 (/dev/ttyS0 and /dev/ttyS1). > > There should not be anything special required to configure the port once > the kernel has recognized it. The enumeration just opens the port and > performs a timed out read. So I'm guessing rxtx could not open the port > because the kernel has yet to recognize a port there. > > -- Trent Jarvi taj at www.linux.org.uk From p_edson at yahoo.com Fri Jul 30 14:26:18 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri, 30 Jul 2004 13:26:18 -0700 (PDT) Subject: [Rxtx] Windows build question Message-ID: <20040730202618.34680.qmail@web12706.mail.yahoo.com> I downloaded the pre17 source and am building the Windows binary using mingw32 on Windows. I'm crashing with an exception right away whereas using the prebuilt binary works fine. dumpbin indicates my build is exporting all of the same symbols except Java_gnu_io_RXTXPort_readTerminatedArray, however and haven't found anything in the source or config files that would trigger it to be left out. Is there some switch or something I am missing? I don't get any errors or warnings during the build that are giving me hints. Thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From taj at www.linux.org.uk Fri Jul 30 18:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 31 Jul 2004 01:51:39 +0100 (BST) Subject: [Rxtx] Windows build question In-Reply-To: <20040730202618.34680.qmail@web12706.mail.yahoo.com> References: <20040730202618.34680.qmail@web12706.mail.yahoo.com> Message-ID: On Fri, 30 Jul 2004, Patrick Edson wrote: > I downloaded the pre17 source and am building the > Windows binary using mingw32 on Windows. I'm crashing > with an exception right away whereas using the > prebuilt binary works fine. > > dumpbin indicates my build is exporting all of the > same symbols except > Java_gnu_io_RXTXPort_readTerminatedArray, however and > haven't found anything in the source or config files > that would trigger it to be left out. Is there some > switch or something I am missing? I don't get any > errors or warnings during the build that are giving me > hints. > > Thanks. > You can just generate the proper exports. I'm sure mingw32 has made this much easier but doing: echo EXPORTS > Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $i|sed s#@.*##;echo "="$i;done >> Serial.def Using the resulting .def for the build should generate a working library. Depending upon the Makefile you used, the .def may not have been regenerated during the build and an older one may have been reused. I'm sure if you look for the above in the Makefile, you will see whats going wrong. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Thu Jul 1 15:11:21 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Thu, 01 Jul 2004 17:11:21 -0400 Subject: [Rxtx] make install, linux fedora Message-ID: <40E47DF9.7080904@burntmail.com> When I try to ompile on fedora core 2 I get this when i do make install: make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory Try `libtool --help --mode=install' for more information. Any ideas? From taj at www.linux.org.uk Fri Jul 2 06:35:33 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 13:35:33 +0100 (BST) Subject: [Rxtx] make install, linux fedora In-Reply-To: <40E47DF9.7080904@burntmail.com> References: <40E47DF9.7080904@burntmail.com> Message-ID: On Thu, 1 Jul 2004, Jake Nelson wrote: > When I try to ompile on fedora core 2 I get this when i do make install: > > make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' > make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' > libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory > Try `libtool --help --mode=install' for more information. > RXTX_PATH must not be set in the Makefile? It should be set at configure time as: RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" so if java is installed in /usr/local and the machine is a ~pentium it would look like: /usr/local/jdk-version/jre/lib/i386 I'm not sure how 'standard' the location is. It may vary between Java vendors and distros. If you find the directory you can set it in the Makefile. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 11:03:00 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:03:00 -0400 Subject: [Rxtx] make install, linux fedora In-Reply-To: References: <40E47DF9.7080904@burntmail.com> Message-ID: <40E59544.5050401@burntmail.com> Thank you, that worked well. I have another problem now though, but since it seems to be unrelated I'll start a new thread. Thanks Jake Trent Jarvi wrote: >On Thu, 1 Jul 2004, Jake Nelson wrote: > > >>When I try to ompile on fedora core 2 I get this when i do make install: >> >>make[1]: Entering directory `/home/jaknel/rxtx-2.1-6' >>make[1]: Leaving directory `/home/jaknel/rxtx-2.1-6' >>libtool: install: `i686-pc-linux-gnu/librxtxRS485.la' is not a directory >>Try `libtool --help --mode=install' for more information. >> >> > >RXTX_PATH must not be set in the Makefile? > >It should be set at configure time as: > >RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" > >so if java is installed in /usr/local and the machine is a ~pentium it >would look like: > >/usr/local/jdk-version/jre/lib/i386 > >I'm not sure how 'standard' the location is. It may vary between Java >vendors and distros. If you find the directory you can set it in the >Makefile. > > From jnelson at burntmail.com Fri Jul 2 11:36:43 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 13:36:43 -0400 Subject: [Rxtx] Dalsemi One wire device. Message-ID: <40E59D2B.9090502@burntmail.com> I'm writing a Java application that reads Dalsemi OneWire temperature sensors. http://www.ibutton.com http://www.ibutton.com/software/1wire/1wire_api.html I installed rxtx-2.1-7pre17. If anyone has experience with this I'd love some help. I have a quick test program: class Test { public static void main(String args[]) { try{ DSPortAdapter adapter = OneWireAccessProvider.getDefaultAdapter(); }catch(Exception e) { System.out.println(e); } for(Enumeration owc_enum = OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) { System.out.println(owc_enum.nextElement()); } } } When i compile and run this program, I get this message: WARNING: Could not load serial comm API for pure-Java DS9097U adapter: java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener This message can be safely ignored if you are using TMEX Drivers or the NetAdapter to connect to the 1-Wire Network. Standard drivers for 1-Wire are not found. Please download the latest drivers from http://www.ibutton.com Or install RXTX Serial Communications API from http://www.rxtx.org If anyone knows what is going on, could you please help me out? Thanks, Jake Nelson From taj at www.linux.org.uk Fri Jul 2 11:48:22 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 2 Jul 2004 18:48:22 +0100 (BST) Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: <40E59D2B.9090502@burntmail.com> References: <40E59D2B.9090502@burntmail.com> Message-ID: On Fri, 2 Jul 2004, Jake Nelson wrote: > I'm writing a Java application that reads Dalsemi OneWire temperature > sensors. http://www.ibutton.com > http://www.ibutton.com/software/1wire/1wire_api.html > > I installed rxtx-2.1-7pre17. If anyone has experience with this I'd > love some help. > > I have a quick test program: > > class Test > { > public static void main(String args[]) > { > try{ > DSPortAdapter adapter = > OneWireAccessProvider.getDefaultAdapter(); > }catch(Exception e) > { > System.out.println(e); > } > for(Enumeration owc_enum = > OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) > { > System.out.println(owc_enum.nextElement()); > } > } > } > > When i compile and run this program, I get this message: > WARNING: Could not load serial comm API for pure-Java DS9097U adapter: > java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener > This message can be safely ignored if you are using TMEX Drivers or > the NetAdapter to connect to the 1-Wire Network. > > > Standard drivers for 1-Wire are not found. > Please download the latest drivers from http://www.ibutton.com > Or install RXTX Serial Communications API from http://www.rxtx.org > > If anyone knows what is going on, could you please help me out? > gnu/io/SerialPortEventListener should be in RXTXcomm.jar. $ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class gnu/io/SerialPortEventListener.class RTXcomm.jar will need to be in your classpath. A convenient place to do this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your classpath. You can also add the jar to your CLASSPATH environment variable. JAVA_HOME is where java is installed. ie /opt/jdk-version to use CLASSPATH simply do the following with a bash shell: export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH assuming /home/bob/testing is where RXTXcomm.jar is located. -- Trent Jarvi taj at www.linux.org.uk From jnelson at burntmail.com Fri Jul 2 12:06:39 2004 From: jnelson at burntmail.com (Jake Nelson) Date: Fri, 02 Jul 2004 14:06:39 -0400 Subject: [Rxtx] Dalsemi One wire device. In-Reply-To: References: <40E59D2B.9090502@burntmail.com> Message-ID: <40E5A42F.5020404@burntmail.com> Trent Jarvi wrote: >On Fri, 2 Jul 2004, Jake Nelson wrote: > > > >>I'm writing a Java application that reads Dalsemi OneWire temperature >>sensors. http://www.ibutton.com >>http://www.ibutton.com/software/1wire/1wire_api.html >> >>I installed rxtx-2.1-7pre17. If anyone has experience with this I'd >>love some help. >> >>I have a quick test program: >> >>class Test >>{ >> public static void main(String args[]) >> { >> try{ >> DSPortAdapter adapter = >>OneWireAccessProvider.getDefaultAdapter(); >> }catch(Exception e) >> { >> System.out.println(e); >> } >> for(Enumeration owc_enum = >>OneWireAccessProvider.enumerateAllAdapters();owc_enum.hasMoreElements();) >> { >> System.out.println(owc_enum.nextElement()); >> } >> } >>} >> >>When i compile and run this program, I get this message: >>WARNING: Could not load serial comm API for pure-Java DS9097U adapter: >>java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener >>This message can be safely ignored if you are using TMEX Drivers or >>the NetAdapter to connect to the 1-Wire Network. >> >> >>Standard drivers for 1-Wire are not found. >>Please download the latest drivers from http://www.ibutton.com >>Or install RXTX Serial Communications API from http://www.rxtx.org >> >>If anyone knows what is going on, could you please help me out? >> >> >> > >gnu/io/SerialPortEventListener should be in RXTXcomm.jar. > >$ jar -tf RXTXcomm.jar gnu/io/SerialPortEventListener.class >gnu/io/SerialPortEventListener.class > >RTXcomm.jar will need to be in your classpath. A convenient place to do >this is $JAVA_HOME/jre/lib/ext - jars in that directory are in your >classpath. You can also add the jar to your CLASSPATH environment >variable. > >JAVA_HOME is where java is installed. ie /opt/jdk-version >to use CLASSPATH simply do the following with a bash shell: > >export CLASSPATH=/home/bob/testing/RXTXcomm.jar:.:$CLASSPATH > >assuming /home/bob/testing is where RXTXcomm.jar is located. > > > Thanks f